Skip to content

Commit

Permalink
Merge pull request #32 from ItalyPaleAle/disable-cgo
Browse files Browse the repository at this point in the history
Setting CGO_ENABLED=0
  • Loading branch information
tj committed Sep 15, 2020
2 parents 8e108c6 + bb12e4e commit 0503daf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions build/build.go
Expand Up @@ -181,6 +181,7 @@ func buildBinary(dir, dst string, bin gobinaries.Binary) error {
ldflags := fmt.Sprintf("-X main.version=%s", bin.Version)
cmd := exec.Command("go", "build", "-o", dst, "-ldflags", ldflags, bin.Path)
cmd.Env = environ()
cmd.Env = append(cmd.Env, "CGO_ENABLED=0")
cmd.Env = append(cmd.Env, "GO111MODULE=on")
cmd.Env = append(cmd.Env, "GOOS="+bin.OS)
cmd.Env = append(cmd.Env, "GOARCH="+bin.Arch)
Expand Down

0 comments on commit 0503daf

Please sign in to comment.