File tree 1 file changed +8
-0
lines changed
src/bootstrap/src/core/build_steps
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(
1057
1057
cargo. rustflag ( "-l" ) . rustflag ( "Enzyme-19" ) ;
1058
1058
}
1059
1059
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
+
1060
1068
// We currently don't support cross-crate LTO in stage0. This also isn't hugely necessary
1061
1069
// and may just be a time sink.
1062
1070
if compiler. stage != 0 {
You can’t perform that action at this time.
0 commit comments