diff --git a/compileopts/config.go b/compileopts/config.go index 0bb839ff7..821aa8313 100644 --- a/compileopts/config.go +++ b/compileopts/config.go @@ -89,7 +89,7 @@ func (c *Config) NeedsStackObjects() bool { switch c.GC() { case "conservative", "extalloc": for _, tag := range c.BuildTags() { - if tag == "wasm" { + if tag == "tinygo.wasm" { return true } } diff --git a/src/runtime/arch_arm.go b/src/runtime/arch_arm.go index e2dc4b5bf..19caa619b 100644 --- a/src/runtime/arch_arm.go +++ b/src/runtime/arch_arm.go @@ -1,4 +1,4 @@ -// +build arm,!baremetal,!wasm arm,arm7tdmi +// +build arm,!baremetal,!tinygo.wasm arm,arm7tdmi package runtime diff --git a/src/runtime/arch_wasm.go b/src/runtime/arch_tinygowasm.go similarity index 98% rename from src/runtime/arch_wasm.go rename to src/runtime/arch_tinygowasm.go index 00dd0deb5..0ee3afd3b 100644 --- a/src/runtime/arch_wasm.go +++ b/src/runtime/arch_tinygowasm.go @@ -1,4 +1,4 @@ -// +build wasm +// +build tinygo.wasm package runtime diff --git a/src/runtime/gc_globals_conservative.go b/src/runtime/gc_globals_conservative.go index bee55a88f..564765515 100644 --- a/src/runtime/gc_globals_conservative.go +++ b/src/runtime/gc_globals_conservative.go @@ -1,5 +1,5 @@ // +build gc.conservative gc.extalloc -// +build baremetal wasm +// +build baremetal tinygo.wasm package runtime diff --git a/src/runtime/gc_globals_precise.go b/src/runtime/gc_globals_precise.go index 2d6c8c14b..f79b71fdc 100644 --- a/src/runtime/gc_globals_precise.go +++ b/src/runtime/gc_globals_precise.go @@ -1,5 +1,5 @@ // +build gc.conservative gc.extalloc -// +build !baremetal,!wasm +// +build !baremetal,!tinygo.wasm package runtime diff --git a/src/runtime/gc_stack_portable.go b/src/runtime/gc_stack_portable.go index d48b24972..d4a046374 100644 --- a/src/runtime/gc_stack_portable.go +++ b/src/runtime/gc_stack_portable.go @@ -1,5 +1,5 @@ // +build gc.conservative gc.extalloc -// +build wasm +// +build tinygo.wasm package runtime diff --git a/src/runtime/gc_stack_raw.go b/src/runtime/gc_stack_raw.go index 74be7fe82..01b07d9bb 100644 --- a/src/runtime/gc_stack_raw.go +++ b/src/runtime/gc_stack_raw.go @@ -1,5 +1,5 @@ // +build gc.conservative gc.extalloc -// +build !wasm +// +build !tinygo.wasm package runtime diff --git a/src/runtime/runtime_wasm.go b/src/runtime/runtime_tinygowasm.go similarity index 98% rename from src/runtime/runtime_wasm.go rename to src/runtime/runtime_tinygowasm.go index 1146f5781..989fbb803 100644 --- a/src/runtime/runtime_wasm.go +++ b/src/runtime/runtime_tinygowasm.go @@ -1,4 +1,4 @@ -// +build wasm +// +build tinygo.wasm package runtime diff --git a/src/runtime/runtime_wasm_wasi.go b/src/runtime/runtime_wasm_wasi.go index 76d0a4520..4f0432f7a 100644 --- a/src/runtime/runtime_wasm_wasi.go +++ b/src/runtime/runtime_wasm_wasi.go @@ -1,4 +1,4 @@ -// +build wasm,wasi +// +build tinygo.wasm,wasi package runtime diff --git a/targets/wasi.json b/targets/wasi.json index c24ed8f10..b80b77d1a 100644 --- a/targets/wasi.json +++ b/targets/wasi.json @@ -1,6 +1,6 @@ { "llvm-target": "wasm32--wasi", - "build-tags": ["wasm", "wasi"], + "build-tags": ["tinygo.wasm", "wasi"], "goos": "linux", "goarch": "arm", "linker": "wasm-ld", diff --git a/targets/wasm.json b/targets/wasm.json index 6208eb27f..eb03eb8c8 100644 --- a/targets/wasm.json +++ b/targets/wasm.json @@ -1,6 +1,6 @@ { "llvm-target": "wasm32--wasi", - "build-tags": ["js", "wasm"], + "build-tags": ["tinygo.wasm"], "goos": "js", "goarch": "wasm", "linker": "wasm-ld",