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() {
217217 eprintln ! ( "{prefix} libdir: {libdir:?}" ) ;
218218 }
219219
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+
220226 let start = Instant :: now ( ) ;
221227 let ( child, status) = {
222228 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 {
906906 cargo. arg ( "-p" ) . arg ( krate) ;
907907 }
908908
909+ if compiler. stage == 1 {
910+ // Relocations are required for BOLT to work.k
911+ cargo. env ( "RUSTC_BOLT_LINK_FLAGS" , "1" ) ;
912+ }
913+
909914 let _guard = builder. msg_sysroot_tool (
910915 Kind :: Build ,
911916 compiler. stage ,
You can’t perform that action at this time.
0 commit comments