build: link globals importpath.name=value

This commit is contained in:
visualfc
2025-05-24 19:11:18 +08:00
parent e68355d94f
commit 4726e824a0
6 changed files with 230 additions and 39 deletions

View File

@@ -31,11 +31,16 @@ const (
LLGoFiles = "_wrap/runtime.c"
)
// GOROOT returns the root of the Go tree. It uses the
// GOROOT environment variable, if set at process start,
// or else the root used during the Go build.
var defaultGOROOT string // set by cmd/link
func GOROOT() string {
return ""
return defaultGOROOT
}
var buildVersion string
func Version() string {
return buildVersion
}
//go:linkname c_maxprocs C.llgo_maxprocs