mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-03 02:27:48 +00:00
fix: allow nintendoswitch target to compile
Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
||||
//go:build baremetal || js || windows || wasm_unknown
|
||||
//go:build baremetal || js || windows || wasm_unknown || nintendoswitch
|
||||
|
||||
// Copyright 2009 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
|
||||
+1
-1
@@ -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 && !wasip2 && !wasm_unknown
|
||||
//go:build linux && !baremetal && !wasip1 && !wasip2 && !wasm_unknown && !nintendoswitch
|
||||
|
||||
package os
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//go:build !baremetal && !js && !wasip1 && !wasip2 && !wasm_unknown
|
||||
//go:build !baremetal && !js && !wasip1 && !wasip2 && !wasm_unknown && !nintendoswitch
|
||||
|
||||
// Copyright 2020 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
|
||||
@@ -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 && !tinygo.wasm
|
||||
//go:build linux && !baremetal && !tinygo.wasm && !nintendoswitch
|
||||
|
||||
package os
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//go:build (!aix && !android && !freebsd && !linux && !netbsd && !openbsd && !plan9 && !solaris) || baremetal || tinygo.wasm
|
||||
//go:build (!aix && !android && !freebsd && !linux && !netbsd && !openbsd && !plan9 && !solaris) || baremetal || tinygo.wasm || nintendoswitch
|
||||
|
||||
package os
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//go:build !baremetal && !js && !wasm_unknown
|
||||
//go:build !baremetal && !js && !wasm_unknown && !nintendoswitch
|
||||
|
||||
// Portions copyright 2009 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//go:build baremetal || (tinygo.wasm && !wasip1 && !wasip2)
|
||||
//go:build baremetal || (tinygo.wasm && !wasip1 && !wasip2) || nintendoswitch
|
||||
|
||||
package os
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
//go:build darwin || (linux && !baremetal && !wasm_unknown) || wasip1 || wasip2
|
||||
//go:build darwin || (linux && !baremetal && !wasm_unknown && !nintendoswitch) || wasip1 || wasip2
|
||||
|
||||
// target wasi sets GOOS=linux and thus the +linux build tag,
|
||||
// even though it doesn't show up in "tinygo info target -wasi"
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
//go:build linux && !baremetal && !tinygo.wasm
|
||||
//go:build linux && !baremetal && !tinygo.wasm && !nintendoswitch
|
||||
|
||||
package os
|
||||
|
||||
|
||||
@@ -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 && !wasip2 && !wasm_unknown
|
||||
//go:build !baremetal && !js && !wasip1 && !wasip2 && !wasm_unknown && !nintendoswitch
|
||||
|
||||
package os
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//go:build baremetal || js || wasip1 || wasip2 || wasm_unknown
|
||||
//go:build baremetal || js || wasip1 || wasip2 || wasm_unknown || nintendoswitch
|
||||
|
||||
// Copyright 2009 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//go:build (linux && !baremetal && !wasm_unknown) || wasip1 || wasip2
|
||||
//go:build (linux && !baremetal && !wasm_unknown && !nintendoswitch) || wasip1 || wasip2
|
||||
|
||||
// Copyright 2009 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//go:build baremetal || (tinygo.wasm && !wasip1 && !wasip2)
|
||||
//go:build baremetal || (tinygo.wasm && !wasip1 && !wasip2) || nintendoswitch
|
||||
|
||||
// Copyright 2016 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
//go:build darwin || (linux && !baremetal && !wasm_unknown) || wasip1 || wasip2
|
||||
//go:build darwin || (linux && !baremetal && !wasm_unknown && !nintendoswitch) || wasip1 || wasip2
|
||||
|
||||
// Copyright 2016 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//go:build !baremetal && !js && !wasm_unknown
|
||||
//go:build !baremetal && !js && !wasm_unknown && !nintendoswitch
|
||||
|
||||
// Copyright 2009 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//go:build darwin || (linux && !baremetal && !wasm_unknown) || wasip1 || wasip2
|
||||
//go:build darwin || (linux && !baremetal && !wasm_unknown && !nintendoswitch) || wasip1 || wasip2
|
||||
|
||||
// Copyright 2009 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//go:build baremetal || js || wasm_unknown
|
||||
//go:build baremetal || js || wasm_unknown || nintendoswitch
|
||||
|
||||
package runtime
|
||||
|
||||
|
||||
@@ -84,6 +84,19 @@ func ticks() timeUnit {
|
||||
return timeUnit(ticksToNanoseconds(timeUnit(getArmSystemTick())))
|
||||
}
|
||||
|
||||
// timeOffset is how long the monotonic clock started after the Unix epoch. It
|
||||
// should be a positive integer under normal operation or zero when it has not
|
||||
// been set.
|
||||
var timeOffset int64
|
||||
|
||||
//go:linkname now time.now
|
||||
func now() (sec int64, nsec int32, mono int64) {
|
||||
mono = nanotime()
|
||||
sec = (mono + timeOffset) / (1000 * 1000 * 1000)
|
||||
nsec = int32((mono + timeOffset) - sec*(1000*1000*1000))
|
||||
return
|
||||
}
|
||||
|
||||
var stdoutBuffer = make([]byte, 120)
|
||||
var position = 0
|
||||
|
||||
@@ -98,6 +111,14 @@ func putchar(c byte) {
|
||||
position++
|
||||
}
|
||||
|
||||
func buffered() int {
|
||||
return 0
|
||||
}
|
||||
|
||||
func getchar() byte {
|
||||
return 0
|
||||
}
|
||||
|
||||
func abort() {
|
||||
for {
|
||||
exit(1)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//go:build (darwin || (linux && !baremetal && !wasip1 && !wasm_unknown && !wasip2)) && !nintendoswitch
|
||||
//go:build darwin || (linux && !baremetal && !wasip1 && !wasm_unknown && !wasip2 && !nintendoswitch)
|
||||
|
||||
package runtime
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//go:build baremetal || tinygo.wasm
|
||||
//go:build baremetal || tinygo.wasm || nintendoswitch
|
||||
|
||||
// This file emulates some process-related functions that are only available
|
||||
// under a real operating system.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//go:build !baremetal && !tinygo.wasm
|
||||
//go:build !baremetal && !tinygo.wasm && !nintendoswitch
|
||||
|
||||
// This file assumes there is a libc available that runs on a real operating
|
||||
// system.
|
||||
|
||||
Reference in New Issue
Block a user