Skip to content

Commit b176c34

Browse files
committed
Revert "implement export all symbols"
This reverts commit aaef5c6.
1 parent 9fcb55d commit b176c34

3 files changed

Lines changed: 0 additions & 17 deletions

File tree

compiler/rustc_codegen_ssa/src/back/linker.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -800,10 +800,6 @@ impl<'a> Linker for GccLinker<'a> {
800800
// The object files have far more public symbols than we actually want to export,
801801
// so we hide them all here.
802802

803-
if self.sess.opts.unstable_opts.export_all_symbols {
804-
return;
805-
}
806-
807803
if !self.sess.target.limit_rdylib_exports {
808804
return;
809805
}
@@ -1142,10 +1138,6 @@ impl<'a> Linker for MsvcLinker<'a> {
11421138
}
11431139
}
11441140

1145-
if self.sess.opts.unstable_opts.export_all_symbols {
1146-
return;
1147-
}
1148-
11491141
let path = tmpdir.join("lib.def");
11501142
let res = try {
11511143
let mut f = File::create_buffered(&path)?;

compiler/rustc_session/src/options.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2343,8 +2343,6 @@ options! {
23432343
"enforce the type length limit when monomorphizing instances in codegen"),
23442344
experimental_default_bounds: bool = (false, parse_bool, [TRACKED],
23452345
"enable default bounds for experimental group of auto traits"),
2346-
export_all_symbols: bool = (false, parse_bool, [TRACKED],
2347-
"disable symbol export filtering for dylibs and cdylibs, exporting all symbols"),
23482346
export_executable_symbols: bool = (false, parse_bool, [TRACKED],
23492347
"export symbols from executables, as if they were dynamic libraries"),
23502348
external_clangrt: bool = (false, parse_bool, [UNTRACKED],

src/bootstrap/src/core/build_steps/compile.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1243,13 +1243,6 @@ pub fn rustc_cargo(
12431243
cargo.rustflag("-Zdefault-visibility=protected");
12441244
}
12451245

1246-
// On Apple, Enzyme can hang if rustc and Enzyme each embed their own LLVM.
1247-
// Export all symbols from rustc_driver so Enzyme reuses rustc's LLVM.
1248-
// Related: https://github.com/rust-lang/enzyme/pull/31
1249-
if builder.config.llvm_enzyme && target.contains("apple") && build_compiler.stage != 0 {
1250-
cargo.rustflag("-Zexport-all-symbols");
1251-
}
1252-
12531246
if is_lto_stage(build_compiler) {
12541247
match builder.config.rust_lto {
12551248
RustcLto::Thin | RustcLto::Fat => {

0 commit comments

Comments
 (0)