File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -379,6 +379,11 @@ pub fn fix_exec_rustc(config: &Config, lock_addr: &str) -> CargoResult<()> {
379379 rustc. retry_with_argfile ( true ) ;
380380 rustc. env_remove ( FIX_ENV_INTERNAL ) ;
381381 args. apply ( & mut rustc) ;
382+ // Removes `FD_CLOEXEC` set by `jobserver::Client` to ensure that the
383+ // compiler can access the jobserver.
384+ if let Some ( client) = config. jobserver_from_env ( ) {
385+ rustc. inherit_jobserver ( client) ;
386+ }
382387
383388 trace ! ( "start rustfixing {:?}" , args. file) ;
384389 let json_error_rustc = {
@@ -451,11 +456,6 @@ pub fn fix_exec_rustc(config: &Config, lock_addr: &str) -> CargoResult<()> {
451456 // things like colored output to work correctly.
452457 rustc. arg ( arg) ;
453458 }
454- // Removes `FD_CLOEXEC` set by `jobserver::Client` to pass jobserver
455- // as environment variables specify.
456- if let Some ( client) = config. jobserver_from_env ( ) {
457- rustc. inherit_jobserver ( client) ;
458- }
459459 debug ! ( "calling rustc to display remaining diagnostics: {rustc}" ) ;
460460 exit_with ( rustc. status ( ) ?) ;
461461}
You can’t perform that action at this time.
0 commit comments