Merge pull request #1126 from visualfc/runtime

runtime: GOOS GOARCH Compiler
This commit is contained in:
xushiwei
2025-05-17 21:16:16 +08:00
committed by GitHub

View File

@@ -1,5 +1,10 @@
package runtime package runtime
import (
"internal/goarch"
"internal/goos"
)
func Goexit() { func Goexit() {
panic("todo") panic("todo")
} }
@@ -12,8 +17,21 @@ func SetFinalizer(obj any, finalizer any) {
panic("todo") panic("todo")
} }
const GOOS = "" // GOOS is the running program's operating system target:
const GOARCH = "" // one of darwin, freebsd, linux, and so on.
// To view possible combinations of GOOS and GOARCH, run "go tool dist list".
const GOOS string = goos.GOOS
// GOARCH is the running program's architecture target:
// one of 386, amd64, arm, s390x, and so on.
const GOARCH string = goarch.GOARCH
// Compiler is the name of the compiler toolchain that built the
// running binary. Known toolchains are:
//
// gc Also known as cmd/compile.
// gccgo The gccgo front end, part of the GCC compiler suite.
const Compiler = "llgo"
func GOMAXPROCS(n int) int { func GOMAXPROCS(n int) int {
panic("todo") panic("todo")