mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-03 10:37:46 +00:00
main: add cached GOROOT to info subcommand
This is necessary for an upcoming VS Code extension to support TinyGo, and may be useful for other people wanting to use proper autocompletion etc in their IDE.
This commit is contained in:
committed by
Ron Evans
parent
1e47d9efac
commit
de3ffe0af7
@@ -940,12 +940,18 @@ func main() {
|
||||
fmt.Fprintln(os.Stderr, err)
|
||||
os.Exit(1)
|
||||
}
|
||||
cachedGOROOT, err := loader.GetCachedGoroot(config)
|
||||
if err != nil {
|
||||
fmt.Fprintln(os.Stderr, err)
|
||||
os.Exit(1)
|
||||
}
|
||||
fmt.Printf("LLVM triple: %s\n", config.Triple())
|
||||
fmt.Printf("GOOS: %s\n", config.GOOS())
|
||||
fmt.Printf("GOARCH: %s\n", config.GOARCH())
|
||||
fmt.Printf("build tags: %s\n", strings.Join(config.BuildTags(), " "))
|
||||
fmt.Printf("garbage collector: %s\n", config.GC())
|
||||
fmt.Printf("scheduler: %s\n", config.Scheduler())
|
||||
fmt.Printf("cached GOROOT: %s\n", cachedGOROOT)
|
||||
case "list":
|
||||
config, err := builder.NewConfig(options)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user