diff options
author | Ayke van Laethem <[email protected]> | 2021-06-21 14:50:24 +0200 |
---|---|---|
committer | Ron Evans <[email protected]> | 2021-06-22 09:03:23 +0200 |
commit | c3032660c9e2e1fd5a188c6ac54902637a77b975 (patch) | |
tree | 7eaf3ae0d0e8cf1fa10e6f3073ef73283f3d1d08 | |
parent | d94f42f6e284e459f0141f986a2232f9867b1c4e (diff) | |
download | tinygo-c3032660c9e2e1fd5a188c6ac54902637a77b975.tar.gz tinygo-c3032660c9e2e1fd5a188c6ac54902637a77b975.zip |
wasi: remove wasm build tag
The wasm build tag together with GOARCH=arm was causing problems in the
internal/cpu package. In general, I think having two architecture build
tag will only cause problems (in this case, wasm and arm) so I've
removed the wasm build tag and replaced it with tinygo.wasm.
This is similar to the tinygo.riscv build tag, which is used for older
Go versions that don't yet have RISC-V support in the standard library
(and therefore pretend to be GOARCH=arm instead).
-rw-r--r-- | compileopts/config.go | 2 | ||||
-rw-r--r-- | src/runtime/arch_arm.go | 2 | ||||
-rw-r--r-- | src/runtime/arch_tinygowasm.go (renamed from src/runtime/arch_wasm.go) | 2 | ||||
-rw-r--r-- | src/runtime/gc_globals_conservative.go | 2 | ||||
-rw-r--r-- | src/runtime/gc_globals_precise.go | 2 | ||||
-rw-r--r-- | src/runtime/gc_stack_portable.go | 2 | ||||
-rw-r--r-- | src/runtime/gc_stack_raw.go | 2 | ||||
-rw-r--r-- | src/runtime/runtime_tinygowasm.go (renamed from src/runtime/runtime_wasm.go) | 2 | ||||
-rw-r--r-- | src/runtime/runtime_wasm_wasi.go | 2 | ||||
-rw-r--r-- | targets/wasi.json | 2 | ||||
-rw-r--r-- | targets/wasm.json | 2 |
11 files changed, 11 insertions, 11 deletions
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 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 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", |