Skip to content
This repository was archived by the owner on Sep 30, 2022. It is now read-only.

Commit 25261af

Browse files
committed
Make 64-bit Windows binaries. No particular reason.
1 parent 9bcd17f commit 25261af

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Diff for: build.go

+5-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ func init() {
2323
}
2424

2525
var (
26-
buildWindows = flag.Bool("newwin", false, "force a make.bash of windows_386")
26+
buildWindows = flag.Bool("newwin", false, "force a make.bash of windows")
27+
28+
buildArch = flag.String("arch", "amd64", "architecture to build")
2729

2830
// Linux/OS X specific (use of HOME) because that's all that
2931
// Brad and Andrew use (and other gophers), and we're the only
@@ -65,7 +67,7 @@ func buildWinstrap() string {
6567
if goRoot == "" {
6668
log.Fatal("no GOROOT set")
6769
}
68-
pkgWin := filepath.Join(goRoot, "pkg", "windows_386")
70+
pkgWin := filepath.Join(goRoot, "pkg", "windows_"+*buildArch)
6971
if _, err := os.Stat(pkgWin); err != nil {
7072
if os.IsNotExist(err) {
7173
log.Printf("no %s directory, need to build windows cross-compiler", pkgWin)
@@ -74,7 +76,7 @@ func buildWinstrap() string {
7476
log.Fatal(err)
7577
}
7678
}
77-
winEnv := append([]string{"CGO_ENABLED=0", "GOOS=windows", "GOARCH=386"}, os.Environ()...)
79+
winEnv := append([]string{"CGO_ENABLED=0", "GOOS=windows", "GOARCH=" + *buildArch}, os.Environ()...)
7880
if *buildWindows {
7981
cmd := exec.Command(filepath.Join(goRoot, "src", "make.bash"))
8082
cmd.Stdout = os.Stdout

0 commit comments

Comments
 (0)