mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-07-26 22:58:41 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 67b45dd14d |
@@ -239,7 +239,8 @@ func (r *runner) run(fn *function, params []value, parentMem *memoryView, indent
|
||||
// already be emitted in initAll.
|
||||
continue
|
||||
case strings.HasPrefix(callFn.name, "runtime.print") || callFn.name == "runtime._panic" || callFn.name == "runtime.hashmapGet" || callFn.name == "runtime.hashmapInterfaceHash" ||
|
||||
callFn.name == "os.runtime_args" || callFn.name == "internal/task.start" || callFn.name == "internal/task.Current" ||
|
||||
callFn.name == "os.runtime_args" || callFn.name == "syscall.runtime_envs" ||
|
||||
callFn.name == "internal/task.start" || callFn.name == "internal/task.Current" ||
|
||||
callFn.name == "time.startTimer" || callFn.name == "time.stopTimer" || callFn.name == "time.resetTimer":
|
||||
// These functions should be run at runtime. Specifically:
|
||||
// * Print and panic functions are best emitted directly without
|
||||
|
||||
+1
-1
@@ -218,7 +218,7 @@ func listGorootMergeLinks(goroot, tinygoroot string, overrides map[string]bool)
|
||||
// with the TinyGo version. This is the case on some targets.
|
||||
func needsSyscallPackage(buildTags []string) bool {
|
||||
for _, tag := range buildTags {
|
||||
if tag == "baremetal" || tag == "nintendoswitch" || tag == "tinygo.wasm" {
|
||||
if tag == "baremetal" || tag == "nintendoswitch" || tag == "wasip1" || tag == "wasip2" || tag == "wasm_unknown" {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//go:build baremetal || (wasm && !wasip1 && !wasip2) || wasm_unknown
|
||||
//go:build baremetal || wasm_unknown
|
||||
|
||||
// This file emulates some file-related functions that are only available
|
||||
// under a real operating system.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//go:build !(baremetal || (wasm && !wasip1 && !wasip2) || wasm_unknown)
|
||||
//go:build !(baremetal || wasm_unknown)
|
||||
|
||||
// This file assumes there is a libc available that runs on a real operating
|
||||
// system.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//go:build baremetal || js || wasm_unknown
|
||||
//go:build baremetal || wasm_unknown
|
||||
|
||||
package syscall
|
||||
|
||||
|
||||
@@ -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 || nintendoswitch || js || wasm_unknown
|
||||
//go:build baremetal || nintendoswitch || wasm_unknown
|
||||
|
||||
package syscall
|
||||
|
||||
|
||||
Reference in New Issue
Block a user