all: retire architecture letter in file names, public API
This CL removes the remaining visible uses of the "architecture letter" concept.
(They are no longer in tool names nor in source directory names.)
Because the architecture letter concept is now gone, delete GOCHAR
from "go env" output, and change go/build.ArchChar to return an
error always.
The architecture letter is still used in the compiler and linker sources
as a clumsy architecture enumeration, but that use is not visible to
Go users and can be cleaned up separately.
Change-Id: I4d97a38f372003fb610c9c5241bea440d9dbeb8d
Reviewed-on: https://go-review.googlesource.com/10289
Reviewed-by: Rob Pike <r@golang.org>
diff --git a/test/run.go b/test/run.go
index a3124bb..47a6298 100644
--- a/test/run.go
+++ b/test/run.go
@@ -15,7 +15,6 @@
"errors"
"flag"
"fmt"
- "go/build"
"io/ioutil"
"log"
"os"
@@ -41,9 +40,6 @@
)
var (
- // letter is the build.ArchChar
- letter string
-
goos, goarch string
// dirs are the directories to look for *.go files in.
@@ -81,9 +77,6 @@
ratec = make(chan bool, *numParallel)
rungatec = make(chan bool, *runoutputLimit)
- var err error
- letter, err = build.ArchChar(build.Default.GOARCH)
- check(err)
var tests []*test
if flag.NArg() > 0 {
@@ -199,7 +192,7 @@
}
func linkFile(runcmd runCmd, goname string) (err error) {
- pfile := strings.Replace(goname, ".go", "."+letter, -1)
+ pfile := strings.Replace(goname, ".go", ".o", -1)
_, err = runcmd("go", "tool", "link", "-w", "-o", "a.exe", "-L", ".", pfile)
return
}
@@ -501,7 +494,7 @@
t.err = fmt.Errorf("unimplemented action %q", action)
case "errorcheck":
- cmdline := []string{"go", "tool", "compile", "-e", "-o", "a." + letter}
+ cmdline := []string{"go", "tool", "compile", "-e", "-o", "a.o"}
cmdline = append(cmdline, flags...)
cmdline = append(cmdline, long)
out, err := runcmd(cmdline...)
@@ -664,7 +657,7 @@
t.err = fmt.Errorf("write tempfile:%s", err)
return
}
- cmdline := []string{"go", "tool", "compile", "-e", "-o", "a." + letter}
+ cmdline := []string{"go", "tool", "compile", "-e", "-o", "a.o"}
cmdline = append(cmdline, flags...)
cmdline = append(cmdline, tfile)
out, err = runcmd(cmdline...)