Skip to content

Commit

Permalink
workaround golang build issues
Browse files Browse the repository at this point in the history
  • Loading branch information
DarienRaymond committed Aug 31, 2018
1 parent 7cabcd2 commit 81ad8f5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion build/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,8 @@ func (t *GoTarget) Envs() []string {
envs = append(envs, "GOARM="+t.ArmOpt)
}
if len(t.MipsOpt) > 0 {
envs = append(envs, "GOMIPS="+t.MipsOpt)
envs = append(envs, "GOMIPS="+t.MipsOpt, "GOMIPS64="+t.MipsOpt)
envs = append(envs, "GOMIPSLE="+t.MipsOpt, "GOMIPS64LE="+t.MipsOpt) // https://github.com/golang/go/issues/27260
}
return envs
}
Expand All @@ -179,6 +180,7 @@ func (t *GoTarget) BuildTo(directory string) (*Output, error) {
trimPath := filepath.Join(goPath, "src")
args := []string{
"build",
"-a", // force rebuild all. see https://github.com/golang/go/issues/27236
"-o", targetFile,
"-compiler", "gc",
"-gcflags", "-trimpath=" + trimPath,
Expand Down

0 comments on commit 81ad8f5

Please sign in to comment.