File tree 3 files changed +11
-16
lines changed
3 files changed +11
-16
lines changed Original file line number Diff line number Diff line change @@ -1130,12 +1130,6 @@ pub fn rustc_cargo_env(
1130
1130
cargo. env ( "CFG_DEFAULT_LINKER" , s) ;
1131
1131
}
1132
1132
1133
- if builder. config . rustc_parallel {
1134
- // keep in sync with `bootstrap/lib.rs:Build::rustc_features`
1135
- // `cfg` option for rustc, `features` option for cargo, for conditional compilation
1136
- cargo. rustflag ( "--cfg=parallel_compiler" ) ;
1137
- cargo. rustdocflag ( "--cfg=parallel_compiler" ) ;
1138
- }
1139
1133
if builder. config . rust_verify_llvm_ir {
1140
1134
cargo. env ( "RUSTC_VERIFY_LLVM_IR" , "1" ) ;
1141
1135
}
Original file line number Diff line number Diff line change @@ -469,7 +469,7 @@ impl Step for Rustdoc {
469
469
features. push ( "jemalloc" . to_string ( ) ) ;
470
470
}
471
471
472
- let mut cargo = prepare_tool_cargo (
472
+ let cargo = prepare_tool_cargo (
473
473
builder,
474
474
build_compiler,
475
475
Mode :: ToolRustc ,
@@ -480,10 +480,6 @@ impl Step for Rustdoc {
480
480
features. as_slice ( ) ,
481
481
) ;
482
482
483
- if builder. config . rustc_parallel {
484
- cargo. rustflag ( "--cfg=parallel_compiler" ) ;
485
- }
486
-
487
483
let _guard = builder. msg_tool (
488
484
Mode :: ToolRustc ,
489
485
"rustdoc" ,
@@ -732,7 +728,7 @@ impl Step for LlvmBitcodeLinker {
732
728
builder. ensure ( compile:: Std :: new ( self . compiler , self . compiler . host ) ) ;
733
729
builder. ensure ( compile:: Rustc :: new ( self . compiler , self . target ) ) ;
734
730
735
- let mut cargo = prepare_tool_cargo (
731
+ let cargo = prepare_tool_cargo (
736
732
builder,
737
733
self . compiler ,
738
734
Mode :: ToolRustc ,
@@ -743,10 +739,6 @@ impl Step for LlvmBitcodeLinker {
743
739
& self . extra_features ,
744
740
) ;
745
741
746
- if builder. config . rustc_parallel {
747
- cargo. rustflag ( "--cfg=parallel_compiler" ) ;
748
- }
749
-
750
742
builder. run ( & mut cargo. into ( ) ) ;
751
743
752
744
let tool_out = builder
Original file line number Diff line number Diff line change @@ -2100,6 +2100,15 @@ impl<'a> Builder<'a> {
2100
2100
rustflags. arg ( "-Zinline-mir" ) ;
2101
2101
}
2102
2102
2103
+ if builder. config . rustc_parallel
2104
+ && matches ! ( mode, Mode :: ToolRustc | Mode :: Rustc | Mode :: Codegen )
2105
+ {
2106
+ // keep in sync with `bootstrap/lib.rs:Build::rustc_features`
2107
+ // `cfg` option for rustc, `features` option for cargo, for conditional compilation
2108
+ rustflags. arg ( "--cfg=parallel_compiler" ) ;
2109
+ rustdocflags. arg ( "--cfg=parallel_compiler" ) ;
2110
+ }
2111
+
2103
2112
// set rustc args passed from command line
2104
2113
let rustc_args =
2105
2114
self . config . cmd . rustc_args ( ) . iter ( ) . map ( |s| s. to_string ( ) ) . collect :: < Vec < _ > > ( ) ;
You can’t perform that action at this time.
0 commit comments