Browse Source

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).
pull/1738/merge
Ayke van Laethem 3 years ago
committed by Ron Evans
parent
commit
c3032660c9
  1. 2
      compileopts/config.go
  2. 2
      src/runtime/arch_arm.go
  3. 2
      src/runtime/arch_tinygowasm.go
  4. 2
      src/runtime/gc_globals_conservative.go
  5. 2
      src/runtime/gc_globals_precise.go
  6. 2
      src/runtime/gc_stack_portable.go
  7. 2
      src/runtime/gc_stack_raw.go
  8. 2
      src/runtime/runtime_tinygowasm.go
  9. 2
      src/runtime/runtime_wasm_wasi.go
  10. 2
      targets/wasi.json
  11. 2
      targets/wasm.json

2
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
}
}

2
src/runtime/arch_arm.go

@ -1,4 +1,4 @@
// +build arm,!baremetal,!wasm arm,arm7tdmi
// +build arm,!baremetal,!tinygo.wasm arm,arm7tdmi
package runtime

2
src/runtime/arch_wasm.go → src/runtime/arch_tinygowasm.go

@ -1,4 +1,4 @@
// +build wasm
// +build tinygo.wasm
package runtime

2
src/runtime/gc_globals_conservative.go

@ -1,5 +1,5 @@
// +build gc.conservative gc.extalloc
// +build baremetal wasm
// +build baremetal tinygo.wasm
package runtime

2
src/runtime/gc_globals_precise.go

@ -1,5 +1,5 @@
// +build gc.conservative gc.extalloc
// +build !baremetal,!wasm
// +build !baremetal,!tinygo.wasm
package runtime

2
src/runtime/gc_stack_portable.go

@ -1,5 +1,5 @@
// +build gc.conservative gc.extalloc
// +build wasm
// +build tinygo.wasm
package runtime

2
src/runtime/gc_stack_raw.go

@ -1,5 +1,5 @@
// +build gc.conservative gc.extalloc
// +build !wasm
// +build !tinygo.wasm
package runtime

2
src/runtime/runtime_wasm.go → src/runtime/runtime_tinygowasm.go

@ -1,4 +1,4 @@
// +build wasm
// +build tinygo.wasm
package runtime

2
src/runtime/runtime_wasm_wasi.go

@ -1,4 +1,4 @@
// +build wasm,wasi
// +build tinygo.wasm,wasi
package runtime

2
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",

2
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",

Loading…
Cancel
Save