File tree Expand file tree Collapse file tree 16 files changed +18
-16
lines changed
examples/hello-wasm-unknown Expand file tree Collapse file tree 16 files changed +18
-16
lines changed Original file line number Diff line number Diff line change 3
3
// tinygo build -size short -o hello-unknown.wasm -target wasm-unknown -gc=leaking -no-debug ./src/examples/hello-wasm-unknown/
4
4
package main
5
5
6
+ // Smoke test: make sure the fmt package can be imported (even if it isn't
7
+ // really useful for wasm-unknown).
8
+ import _ "os"
9
+
6
10
var x int32
7
11
8
12
//go:wasmimport hosted echo_i32
Original file line number Diff line number Diff line change 1
- //go:build baremetal || js || windows
1
+ //go:build baremetal || js || windows || wasm_unknown
2
2
3
3
// Copyright 2009 The Go Authors. All rights reserved.
4
4
// Use of this source code is governed by a BSD-style
Original file line number Diff line number Diff line change 2
2
// Use of this source code is governed by a BSD-style
3
3
// license that can be found in the LICENSE file.
4
4
5
- //go:build linux && !baremetal && !wasip1
5
+ //go:build linux && !baremetal && !wasip1 && !wasm_unknown
6
6
7
7
package os
8
8
Original file line number Diff line number Diff line change 1
- //go:build !baremetal && !js && !wasip1
1
+ //go:build !baremetal && !js && !wasip1 && !wasm_unknown
2
2
3
3
// Copyright 2020 The Go Authors. All rights reserved.
4
4
// Use of this source code is governed by a BSD-style
Original file line number Diff line number Diff line change 1
- //go:build !baremetal && !js
1
+ //go:build !baremetal && !js && !wasm_unknown
2
2
3
3
// Portions copyright 2009 The Go Authors. All rights reserved.
4
4
// Use of this source code is governed by a BSD-style
Original file line number Diff line number Diff line change 1
- //go:build baremetal || (wasm && !wasip1)
1
+ //go:build baremetal || (tinygo. wasm && !wasip1)
2
2
3
3
package os
4
4
Original file line number Diff line number Diff line change 1
- //go:build darwin || (linux && !baremetal) || wasip1
1
+ //go:build darwin || (linux && !baremetal && !wasm_unknown ) || wasip1
2
2
3
3
// target wasi sets GOOS=linux and thus the +linux build tag,
4
4
// even though it doesn't show up in "tinygo info target -wasi"
Original file line number Diff line number Diff line change 2
2
// Use of this source code is governed by a BSD-style
3
3
// license that can be found in the LICENSE file.
4
4
5
- //go:build !baremetal && !js && !wasip1
5
+ //go:build !baremetal && !js && !wasip1 && !wasm_unknown
6
6
7
7
package os
8
8
Original file line number Diff line number Diff line change 1
- //go:build baremetal || js || wasi || wasip1
1
+ //go:build baremetal || js || wasi || wasip1 || wasm_unknown
2
2
3
3
// Copyright 2009 The Go Authors. All rights reserved.
4
4
// Use of this source code is governed by a BSD-style
Original file line number Diff line number Diff line change 1
- //go:build (linux && !baremetal) || wasip1
1
+ //go:build (linux && !baremetal && !wasm_unknown ) || wasip1
2
2
3
3
// Copyright 2009 The Go Authors. All rights reserved.
4
4
// Use of this source code is governed by a BSD-style
Original file line number Diff line number Diff line change 1
- //go:build baremetal || (wasm && !wasip1)
1
+ //go:build baremetal || (tinygo. wasm && !wasip1)
2
2
3
3
// Copyright 2016 The Go Authors. All rights reserved.
4
4
// Use of this source code is governed by a BSD-style
Original file line number Diff line number Diff line change 1
- //go:build darwin || (linux && !baremetal) || wasip1
1
+ //go:build darwin || (linux && !baremetal && !wasm_unknown ) || wasip1
2
2
3
3
// Copyright 2016 The Go Authors. All rights reserved.
4
4
// Use of this source code is governed by a BSD-style
Original file line number Diff line number Diff line change 1
- //go:build !baremetal && !js
1
+ //go:build !baremetal && !js && !wasm_unknown
2
2
3
3
// Copyright 2009 The Go Authors. All rights reserved.
4
4
// Use of this source code is governed by a BSD-style
Original file line number Diff line number Diff line change 1
- //go:build darwin || (linux && !baremetal) || wasip1
1
+ //go:build darwin || (linux && !baremetal && !wasm_unknown ) || wasip1
2
2
3
3
// Copyright 2009 The Go Authors. All rights reserved.
4
4
// Use of this source code is governed by a BSD-style
Original file line number Diff line number Diff line change 1
- //go:build baremetal || js
1
+ //go:build baremetal || js || wasm_unknown
2
2
3
3
package runtime
4
4
Original file line number Diff line number Diff line change @@ -23,8 +23,6 @@ func init() {
23
23
__wasm_call_ctors ()
24
24
}
25
25
26
- var args []string
27
-
28
26
func ticksToNanoseconds (ticks timeUnit ) int64 {
29
27
return int64 (ticks )
30
28
}
You can’t perform that action at this time.
0 commit comments