From fa904e1cfd4e4f605749728e193be193b5440882 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 2 Feb 2023 12:41:57 -0800 Subject: [PATCH] [tailscale] 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: Jenny Zhang (Cherry-picked from a2f29de) --- 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 884e9d729a6a3..5c1daecd4c3d9 100644 --- a/src/cmd/dist/buildgo.go +++ b/src/cmd/dist/buildgo.go @@ -7,7 +7,6 @@ package main import ( "fmt" "io" - "os" "path/filepath" "sort" "strings" @@ -119,7 +118,7 @@ func mkzcgo(dir, file string) { writeHeader(&buf) fmt.Fprintf(&buf, "package build\n") fmt.Fprintln(&buf) - fmt.Fprintf(&buf, "const defaultCGO_ENABLED = %s\n", quote(os.Getenv("CGO_ENABLED"))) + fmt.Fprintf(&buf, "const defaultCGO_ENABLED = %q\n", "") writefile(buf.String(), file, writeSkipSame) }