We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 759e07f commit 00da974Copy full SHA for 00da974
src/bootstrap/src/core/build_steps/compile.rs
@@ -1057,6 +1057,14 @@ pub fn rustc_cargo(
1057
cargo.rustflag("-l").rustflag("Enzyme-19");
1058
}
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
+
1068
// We currently don't support cross-crate LTO in stage0. This also isn't hugely necessary
1069
// and may just be a time sink.
1070
if compiler.stage != 0 {
0 commit comments