mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-09 13:33:39 +00:00
builder: move Go version code to goenv package
This is necessary to avoid a circular dependency in the loader (which soon will need to read the Go version) and because it seems like a better place anyway.
This commit is contained in:
committed by
Ron Evans
parent
4918395f88
commit
2a98433c8e
@@ -897,7 +897,7 @@ func main() {
|
||||
usage()
|
||||
case "version":
|
||||
goversion := "<unknown>"
|
||||
if s, err := builder.GorootVersionString(goenv.Get("GOROOT")); err == nil {
|
||||
if s, err := goenv.GorootVersionString(goenv.Get("GOROOT")); err == nil {
|
||||
goversion = s
|
||||
}
|
||||
fmt.Printf("tinygo version %s %s/%s (using go version %s and LLVM version %s)\n", version, runtime.GOOS, runtime.GOARCH, goversion, llvm.Version)
|
||||
|
||||
Reference in New Issue
Block a user