From a2f29de0a91a04521eaef084ab7eefd319d4fbbe Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 2 Feb 2023 12:41:57 -0800 Subject: [PATCH] [tailscale1.20] cmd/dist: always default to CGO_ENABLED="" Lets us build a statically linked toolchain that has the same cgo behavior as the standard dynamic toolchain. Signed-off-by: David Anderson --- src/cmd/dist/buildgo.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/cmd/dist/buildgo.go b/src/cmd/dist/buildgo.go index 29b0167f470ec..ba535f11f66e5 100644 --- a/src/cmd/dist/buildgo.go +++ b/src/cmd/dist/buildgo.go @@ -6,7 +6,6 @@ package main import ( "fmt" - "os" "path/filepath" "sort" "strings" @@ -114,7 +113,7 @@ func mkzcgo(dir, file string) { fmt.Fprintln(&buf) fmt.Fprintf(&buf, "package build\n") fmt.Fprintln(&buf) - fmt.Fprintf(&buf, "const defaultCGO_ENABLED = %q\n", os.Getenv("CGO_ENABLED")) + fmt.Fprintf(&buf, "const defaultCGO_ENABLED = %q\n", "") fmt.Fprintln(&buf) fmt.Fprintf(&buf, "var cgoEnabled = map[string]bool{\n") for _, plat := range list {