diff options
Diffstat (limited to 'src/cmd/internal/objabi/flag.go')
-rw-r--r-- | src/cmd/internal/objabi/flag.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/cmd/internal/objabi/flag.go b/src/cmd/internal/objabi/flag.go index 9fcab4cc85..e41fc570b0 100644 --- a/src/cmd/internal/objabi/flag.go +++ b/src/cmd/internal/objabi/flag.go @@ -8,6 +8,7 @@ import ( "bytes" "flag" "fmt" + "internal/buildcfg" "io" "io/ioutil" "log" @@ -96,11 +97,11 @@ func (versionFlag) Set(s string) error { if s == "goexperiment" { // test/run.go uses this to discover the full set of // experiment tags. Report everything. - p = " X:" + strings.Join(expList(&Experiment, nil, true), ",") + p = " X:" + strings.Join(buildcfg.AllExperiments(), ",") } else { // If the enabled experiments differ from the defaults, // include that difference. - if goexperiment := GOEXPERIMENT(); goexperiment != "" { + if goexperiment := buildcfg.GOEXPERIMENT(); goexperiment != "" { p = " X:" + goexperiment } } @@ -111,12 +112,12 @@ func (versionFlag) Set(s string) error { // build ID of the binary, so that if the compiler is changed and // rebuilt, we notice and rebuild all packages. if s == "full" { - if strings.HasPrefix(Version, "devel") { + if strings.HasPrefix(buildcfg.Version, "devel") { p += " buildID=" + buildID } } - fmt.Printf("%s version %s%s\n", name, Version, p) + fmt.Printf("%s version %s%s\n", name, buildcfg.Version, p) os.Exit(0) return nil } |