File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
src/bootstrap/src/core/build_steps Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -1057,6 +1057,14 @@ pub fn rustc_cargo(
10571057 cargo. rustflag ( "-l" ) . rustflag ( "Enzyme-19" ) ;
10581058 }
10591059
1060+ // Building with protected visibility reduces the number of dynamic relocations needed, giving
1061+ // us a faster startup time. However GNU ld < 2.40 will error if we try to link a shared object
1062+ // with direct references to protected symbols, so for now we only use protected symbols if
1063+ // linking with LLD is enabled.
1064+ if builder. build . config . lld_mode . is_used ( ) {
1065+ cargo. rustflag ( "-Zdefault-visibility=protected" ) ;
1066+ }
1067+
10601068 // We currently don't support cross-crate LTO in stage0. This also isn't hugely necessary
10611069 // and may just be a time sink.
10621070 if compiler. stage != 0 {
You can’t perform that action at this time.
0 commit comments