diff options
| author | daxpedda <daxpedda@gmail.com> | 2024-11-20 13:48:48 +0100 |
|---|---|---|
| committer | daxpedda <daxpedda@gmail.com> | 2024-11-20 14:02:25 +0100 |
| commit | f37d021d6ccb7949ba8e8b2a5d6e91686063da2a (patch) | |
| tree | 07f8caddc856d17347aac1d6c80472d1bb308046 /compiler | |
| parent | fda68927475070696fcc9d1f5c9c990f0e1af87a (diff) | |
| download | rust-f37d021d6ccb7949ba8e8b2a5d6e91686063da2a.tar.gz rust-f37d021d6ccb7949ba8e8b2a5d6e91686063da2a.zip | |
Account for `wasm32v1-none` when exporting TLS symbols
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/back/linker.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/linker.rs b/compiler/rustc_codegen_ssa/src/back/linker.rs index 4f3664a503d..6ee599c9964 100644 --- a/compiler/rustc_codegen_ssa/src/back/linker.rs +++ b/compiler/rustc_codegen_ssa/src/back/linker.rs @@ -1279,7 +1279,7 @@ impl<'a> WasmLd<'a> { let mut wasm_ld = WasmLd { cmd, sess }; if sess.target_features.contains(&sym::atomics) { wasm_ld.link_args(&["--shared-memory", "--max-memory=1073741824", "--import-memory"]); - if sess.target.os == "unknown" { + if sess.target.os == "unknown" || sess.target.os == "none" { wasm_ld.link_args(&[ "--export=__wasm_init_tls", "--export=__tls_size", @@ -1403,7 +1403,7 @@ impl<'a> Linker for WasmLd<'a> { // symbols explicitly passed via the `--export` flags above and hides all // others. Various bits and pieces of wasm32-unknown-unknown tooling use // this, so be sure these symbols make their way out of the linker as well. - if self.sess.target.os == "unknown" { + if self.sess.target.os == "unknown" || self.sess.target.os == "none" { self.link_args(&["--export=__heap_base", "--export=__data_end"]); } } |
