about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-09-22 17:49:53 +0000
committerbors <bors@rust-lang.org>2025-09-22 17:49:53 +0000
commitf6092f224d2b1774b31033f12d0bee626943b02f (patch)
tree1c8b51e940fc58b7fb0105d22b160b831448e6ce /compiler/rustc_codegen_ssa
parentce4beebecb77821734079cff47d8af08f9f27f11 (diff)
parent9814d0854587131ee410fa11d7cd4b83f2c195e7 (diff)
downloadrust-f6092f224d2b1774b31033f12d0bee626943b02f.tar.gz
rust-f6092f224d2b1774b31033f12d0bee626943b02f.zip
Auto merge of #146892 - GuillaumeGomez:rollup-fa7lp0n, r=GuillaumeGomez
Rollup of 5 pull requests

Successful merges:

 - rust-lang/rust#146795 (Enable `limit_rdylib_exports` on wasm targets)
 - rust-lang/rust#146828 (fix a crash in rustdoc merge finalize without input file)
 - rust-lang/rust#146848 (Add x86_64-unknown-motor (Motor OS) tier 3 target)
 - rust-lang/rust#146884 (Fix modification check of `rustdoc-json-types`)
 - rust-lang/rust#146887 (Remove unused #![feature(get_mut_unchecked)] in Rc and Arc examples)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_ssa')
-rw-r--r--compiler/rustc_codegen_ssa/src/back/linker.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/linker.rs b/compiler/rustc_codegen_ssa/src/back/linker.rs
index a2efd420a32..b90be2faa08 100644
--- a/compiler/rustc_codegen_ssa/src/back/linker.rs
+++ b/compiler/rustc_codegen_ssa/src/back/linker.rs
@@ -845,6 +845,11 @@ impl<'a> Linker for GccLinker<'a> {
                 self.sess.dcx().emit_fatal(errors::VersionScriptWriteFailure { error });
             }
             self.link_arg("--dynamic-list").link_arg(path);
+        } else if self.sess.target.is_like_wasm {
+            self.link_arg("--no-export-dynamic");
+            for (sym, _) in symbols {
+                self.link_arg("--export").link_arg(sym);
+            }
         } else {
             // Write an LD version script
             let res: io::Result<()> = try {