Skip to content

Commit c303266

Browse files
aykevldeadprogram
authored andcommitted
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).
1 parent d94f42f commit c303266

11 files changed

+11
-11
lines changed

compileopts/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ func (c *Config) NeedsStackObjects() bool {
8989
switch c.GC() {
9090
case "conservative", "extalloc":
9191
for _, tag := range c.BuildTags() {
92-
if tag == "wasm" {
92+
if tag == "tinygo.wasm" {
9393
return true
9494
}
9595
}

src/runtime/arch_arm.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// +build arm,!baremetal,!wasm arm,arm7tdmi
1+
// +build arm,!baremetal,!tinygo.wasm arm,arm7tdmi
22

33
package runtime
44

src/runtime/arch_wasm.go renamed to src/runtime/arch_tinygowasm.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// +build wasm
1+
// +build tinygo.wasm
22

33
package runtime
44

src/runtime/gc_globals_conservative.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// +build gc.conservative gc.extalloc
2-
// +build baremetal wasm
2+
// +build baremetal tinygo.wasm
33

44
package runtime
55

src/runtime/gc_globals_precise.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// +build gc.conservative gc.extalloc
2-
// +build !baremetal,!wasm
2+
// +build !baremetal,!tinygo.wasm
33

44
package runtime
55

src/runtime/gc_stack_portable.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// +build gc.conservative gc.extalloc
2-
// +build wasm
2+
// +build tinygo.wasm
33

44
package runtime
55

src/runtime/gc_stack_raw.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// +build gc.conservative gc.extalloc
2-
// +build !wasm
2+
// +build !tinygo.wasm
33

44
package runtime
55

src/runtime/runtime_wasm.go renamed to src/runtime/runtime_tinygowasm.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// +build wasm
1+
// +build tinygo.wasm
22

33
package runtime
44

src/runtime/runtime_wasm_wasi.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// +build wasm,wasi
1+
// +build tinygo.wasm,wasi
22

33
package runtime
44

targets/wasi.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"llvm-target": "wasm32--wasi",
3-
"build-tags": ["wasm", "wasi"],
3+
"build-tags": ["tinygo.wasm", "wasi"],
44
"goos": "linux",
55
"goarch": "arm",
66
"linker": "wasm-ld",

targets/wasm.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"llvm-target": "wasm32--wasi",
3-
"build-tags": ["js", "wasm"],
3+
"build-tags": ["tinygo.wasm"],
44
"goos": "js",
55
"goarch": "wasm",
66
"linker": "wasm-ld",

0 commit comments

Comments
 (0)