diff options
-rw-r--r-- | src/examples/hello-wasm-unknown/main.go | 4 | ||||
-rw-r--r-- | src/os/dir_other.go | 2 | ||||
-rw-r--r-- | src/os/dir_unix.go | 2 | ||||
-rw-r--r-- | src/os/dirent_linux.go | 2 | ||||
-rw-r--r-- | src/os/file_anyos.go | 2 | ||||
-rw-r--r-- | src/os/file_other.go | 2 | ||||
-rw-r--r-- | src/os/file_unix.go | 2 | ||||
-rw-r--r-- | src/os/removeall_noat.go | 2 | ||||
-rw-r--r-- | src/os/removeall_other.go | 2 | ||||
-rw-r--r-- | src/os/stat_linuxlike.go | 2 | ||||
-rw-r--r-- | src/os/stat_other.go | 2 | ||||
-rw-r--r-- | src/os/stat_unix.go | 2 | ||||
-rw-r--r-- | src/os/types_anyos.go | 2 | ||||
-rw-r--r-- | src/os/types_unix.go | 2 | ||||
-rw-r--r-- | src/runtime/nonhosted.go | 2 | ||||
-rw-r--r-- | src/runtime/runtime_wasm_unknown.go | 2 |
16 files changed, 18 insertions, 16 deletions
diff --git a/src/examples/hello-wasm-unknown/main.go b/src/examples/hello-wasm-unknown/main.go index 557f4a3c3..ff2ec88f1 100644 --- a/src/examples/hello-wasm-unknown/main.go +++ b/src/examples/hello-wasm-unknown/main.go @@ -3,6 +3,10 @@ // tinygo build -size short -o hello-unknown.wasm -target wasm-unknown -gc=leaking -no-debug ./src/examples/hello-wasm-unknown/ package main +// Smoke test: make sure the fmt package can be imported (even if it isn't +// really useful for wasm-unknown). +import _ "os" + var x int32 //go:wasmimport hosted echo_i32 diff --git a/src/os/dir_other.go b/src/os/dir_other.go index 9a1b39421..60cd9f8e6 100644 --- a/src/os/dir_other.go +++ b/src/os/dir_other.go @@ -1,4 +1,4 @@ -//go:build baremetal || js || windows +//go:build baremetal || js || windows || wasm_unknown // Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/src/os/dir_unix.go b/src/os/dir_unix.go index a531e0a63..227dc9188 100644 --- a/src/os/dir_unix.go +++ b/src/os/dir_unix.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build linux && !baremetal && !wasip1 +//go:build linux && !baremetal && !wasip1 && !wasm_unknown package os diff --git a/src/os/dirent_linux.go b/src/os/dirent_linux.go index 90f7086db..790c26890 100644 --- a/src/os/dirent_linux.go +++ b/src/os/dirent_linux.go @@ -1,4 +1,4 @@ -//go:build !baremetal && !js && !wasip1 +//go:build !baremetal && !js && !wasip1 && !wasm_unknown // Copyright 2020 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/src/os/file_anyos.go b/src/os/file_anyos.go index 0436d1222..1483f11c2 100644 --- a/src/os/file_anyos.go +++ b/src/os/file_anyos.go @@ -1,4 +1,4 @@ -//go:build !baremetal && !js +//go:build !baremetal && !js && !wasm_unknown // Portions copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/src/os/file_other.go b/src/os/file_other.go index e7fabddca..82552c1a8 100644 --- a/src/os/file_other.go +++ b/src/os/file_other.go @@ -1,4 +1,4 @@ -//go:build baremetal || (wasm && !wasip1) +//go:build baremetal || (tinygo.wasm && !wasip1) package os diff --git a/src/os/file_unix.go b/src/os/file_unix.go index 25f0266a6..25c2161e3 100644 --- a/src/os/file_unix.go +++ b/src/os/file_unix.go @@ -1,4 +1,4 @@ -//go:build darwin || (linux && !baremetal) || wasip1 +//go:build darwin || (linux && !baremetal && !wasm_unknown) || wasip1 // target wasi sets GOOS=linux and thus the +linux build tag, // even though it doesn't show up in "tinygo info target -wasi" diff --git a/src/os/removeall_noat.go b/src/os/removeall_noat.go index 8b03756e3..d49162768 100644 --- a/src/os/removeall_noat.go +++ b/src/os/removeall_noat.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build !baremetal && !js && !wasip1 +//go:build !baremetal && !js && !wasip1 && !wasm_unknown package os diff --git a/src/os/removeall_other.go b/src/os/removeall_other.go index ec055a987..75346bc83 100644 --- a/src/os/removeall_other.go +++ b/src/os/removeall_other.go @@ -1,4 +1,4 @@ -//go:build baremetal || js || wasi || wasip1 +//go:build baremetal || js || wasi || wasip1 || wasm_unknown // Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/src/os/stat_linuxlike.go b/src/os/stat_linuxlike.go index f2ff8a5f6..59ee64970 100644 --- a/src/os/stat_linuxlike.go +++ b/src/os/stat_linuxlike.go @@ -1,4 +1,4 @@ -//go:build (linux && !baremetal) || wasip1 +//go:build (linux && !baremetal && !wasm_unknown) || wasip1 // Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/src/os/stat_other.go b/src/os/stat_other.go index 7340fbb57..d3e0af6ed 100644 --- a/src/os/stat_other.go +++ b/src/os/stat_other.go @@ -1,4 +1,4 @@ -//go:build baremetal || (wasm && !wasip1) +//go:build baremetal || (tinygo.wasm && !wasip1) // Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/src/os/stat_unix.go b/src/os/stat_unix.go index 54b2bb485..a3aa491f3 100644 --- a/src/os/stat_unix.go +++ b/src/os/stat_unix.go @@ -1,4 +1,4 @@ -//go:build darwin || (linux && !baremetal) || wasip1 +//go:build darwin || (linux && !baremetal && !wasm_unknown) || wasip1 // Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/src/os/types_anyos.go b/src/os/types_anyos.go index cb3a0b949..939c00967 100644 --- a/src/os/types_anyos.go +++ b/src/os/types_anyos.go @@ -1,4 +1,4 @@ -//go:build !baremetal && !js +//go:build !baremetal && !js && !wasm_unknown // Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/src/os/types_unix.go b/src/os/types_unix.go index 943fc00f5..3a552dfd9 100644 --- a/src/os/types_unix.go +++ b/src/os/types_unix.go @@ -1,4 +1,4 @@ -//go:build darwin || (linux && !baremetal) || wasip1 +//go:build darwin || (linux && !baremetal && !wasm_unknown) || wasip1 // Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/src/runtime/nonhosted.go b/src/runtime/nonhosted.go index 6b47ba8b0..ca5ab4c3c 100644 --- a/src/runtime/nonhosted.go +++ b/src/runtime/nonhosted.go @@ -1,4 +1,4 @@ -//go:build baremetal || js +//go:build baremetal || js || wasm_unknown package runtime diff --git a/src/runtime/runtime_wasm_unknown.go b/src/runtime/runtime_wasm_unknown.go index 111bddf08..d307a4f87 100644 --- a/src/runtime/runtime_wasm_unknown.go +++ b/src/runtime/runtime_wasm_unknown.go @@ -23,8 +23,6 @@ func init() { __wasm_call_ctors() } -var args []string - func ticksToNanoseconds(ticks timeUnit) int64 { return int64(ticks) } |