File tree 2 files changed +8
-4
lines changed
2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -907,7 +907,7 @@ impl Step for Rustc {
907
907
}
908
908
909
909
if builder. build . config . enable_bolt_settings && compiler. stage == 1 {
910
- // Relocations are required for BOLT to work.k
910
+ // Relocations are required for BOLT to work.
911
911
cargo. env ( "RUSTC_BOLT_LINK_FLAGS" , "1" ) ;
912
912
}
913
913
Original file line number Diff line number Diff line change @@ -215,7 +215,12 @@ fn execute_pipeline(
215
215
print_free_disk_space ( ) ?;
216
216
217
217
stage. section ( "Build PGO optimized rustc" , |section| {
218
- Bootstrap :: build ( env) . rustc_pgo_optimize ( & profile) . run ( section)
218
+ let mut cmd = Bootstrap :: build ( env) . rustc_pgo_optimize ( & profile) ;
219
+ if env. use_bolt ( ) {
220
+ cmd = cmd. with_rustc_bolt_ldflags ( ) ;
221
+ }
222
+
223
+ cmd. run ( section)
219
224
} ) ?;
220
225
221
226
Ok ( profile)
@@ -259,7 +264,6 @@ fn execute_pipeline(
259
264
stage. section ( "Build PGO optimized LLVM" , |stage| {
260
265
Bootstrap :: build ( env)
261
266
. with_llvm_bolt_ldflags ( )
262
- . with_rustc_bolt_ldflags ( )
263
267
. llvm_pgo_optimize ( & llvm_pgo_profile)
264
268
. avoid_rustc_rebuild ( )
265
269
. run ( stage)
@@ -270,7 +274,7 @@ fn execute_pipeline(
270
274
271
275
log:: info!( "Optimizing {llvm_lib} with BOLT" ) ;
272
276
273
- // FIXME(kobzol: try gather profiles together, at once for LLVM and rustc
277
+ // FIXME(kobzol) : try gather profiles together, at once for LLVM and rustc
274
278
// Instrument the libraries and gather profiles
275
279
let llvm_profile = with_bolt_instrumented ( & llvm_lib, |llvm_profile_dir| {
276
280
stage. section ( "Gather profiles" , |_| {
You can’t perform that action at this time.
0 commit comments