File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -217,6 +217,12 @@ fn main() {
217
217
eprintln ! ( "{prefix} libdir: {libdir:?}" ) ;
218
218
}
219
219
220
+ if env:: var_os ( "RUSTC_BOLT_LINK_FLAGS" ) . is_some ( ) {
221
+ if let Some ( "rustc_driver" ) = crate_name {
222
+ cmd. arg ( "-Clink-args=-Wl,-q" ) ;
223
+ }
224
+ }
225
+
220
226
let start = Instant :: now ( ) ;
221
227
let ( child, status) = {
222
228
let errmsg = format ! ( "\n Failed to run:\n {cmd:?}\n -------------" ) ;
Original file line number Diff line number Diff line change @@ -906,6 +906,11 @@ impl Step for Rustc {
906
906
cargo. arg ( "-p" ) . arg ( krate) ;
907
907
}
908
908
909
+ if compiler. stage == 1 {
910
+ // Relocations are required for BOLT to work.k
911
+ cargo. env ( "RUSTC_BOLT_LINK_FLAGS" , "1" ) ;
912
+ }
913
+
909
914
let _guard = builder. msg_sysroot_tool (
910
915
Kind :: Build ,
911
916
compiler. stage ,
You can’t perform that action at this time.
0 commit comments