Skip to content

Commit f37d021

Browse files
committed
Account for wasm32v1-none when exporting TLS symbols
1 parent fda6892 commit f37d021

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/rustc_codegen_ssa/src/back/linker.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1279,7 +1279,7 @@ impl<'a> WasmLd<'a> {
12791279
let mut wasm_ld = WasmLd { cmd, sess };
12801280
if sess.target_features.contains(&sym::atomics) {
12811281
wasm_ld.link_args(&["--shared-memory", "--max-memory=1073741824", "--import-memory"]);
1282-
if sess.target.os == "unknown" {
1282+
if sess.target.os == "unknown" || sess.target.os == "none" {
12831283
wasm_ld.link_args(&[
12841284
"--export=__wasm_init_tls",
12851285
"--export=__tls_size",
@@ -1403,7 +1403,7 @@ impl<'a> Linker for WasmLd<'a> {
14031403
// symbols explicitly passed via the `--export` flags above and hides all
14041404
// others. Various bits and pieces of wasm32-unknown-unknown tooling use
14051405
// this, so be sure these symbols make their way out of the linker as well.
1406-
if self.sess.target.os == "unknown" {
1406+
if self.sess.target.os == "unknown" || self.sess.target.os == "none" {
14071407
self.link_args(&["--export=__heap_base", "--export=__data_end"]);
14081408
}
14091409
}

0 commit comments

Comments
 (0)