mirror of
https://github.com/golang/go
synced 2024-11-18 19:54:44 -07:00
go.tools/dashboard/builder: always cross compile for nacl builds
If we are building, for example, linux/386 on a linux/amd64 machine we want to make sure that the whole build is done as a if this were compiled on a real linux/386 machine. In other words, we want to not do a cross compilation build. The exception to this rule is when we are doing nacl builds. These are by definition always cross compilation, and we have support built into cmd/go to be able to handle this case. LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://golang.org/cl/74230043
This commit is contained in:
parent
98ed3d3c76
commit
dc0772a41e
@ -54,11 +54,20 @@ func (b *Builder) envv() []string {
|
||||
if *buildTool == "go" {
|
||||
e = []string{
|
||||
"GOOS=" + b.goos,
|
||||
"GOHOSTOS=" + b.goos,
|
||||
"GOARCH=" + b.goarch,
|
||||
"GOHOSTARCH=" + b.goarch,
|
||||
"GOROOT_FINAL=/usr/local/go",
|
||||
}
|
||||
if b.goos != "nacl" {
|
||||
// If we are building, for example, linux/386 on a linux/amd64 machine we want to
|
||||
// make sure that the whole build is done as a if this were compiled on a real
|
||||
// linux/386 machine. In other words, we want to not do a cross compilation build.
|
||||
// To do this we set GOHOSTOS and GOHOSTARCH to override the detection in make.bash.
|
||||
//
|
||||
// The exception to this rule is when we are doing nacl builds. These are by definition
|
||||
// always cross compilation, and we have support built into cmd/go to be able to handle
|
||||
// this case.
|
||||
e = append(e, "GOHOSTOS="+b.goos, "GOHOSTARCH="+b.goarch)
|
||||
}
|
||||
}
|
||||
|
||||
for _, k := range extraEnv {
|
||||
|
Loading…
Reference in New Issue
Block a user