Skip to content

Commit c1d3e9e

Browse files
committed
Revert "[tailscale] cmd/dist: always default to CGO_ENABLED="""
This reverts commit a4256bc. This now breaks x/tools/go/packages (and thus depaware) for some reason, but this also doesn't seem necessary anymore--- the Go 1.24.0 binaries (cmd/go) are already statically linked. So I'm going to revert this and run it through our CI and verify this is truly not needed anymore. I haven't dug into when/why Go changed its behavior yet. Updates #52
1 parent a529f1c commit c1d3e9e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/cmd/dist/buildgo.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ package main
77
import (
88
"fmt"
99
"io"
10+
"os"
1011
"path/filepath"
1112
"sort"
1213
"strings"
@@ -118,7 +119,7 @@ func mkzcgo(dir, file string) {
118119
writeHeader(&buf)
119120
fmt.Fprintf(&buf, "package build\n")
120121
fmt.Fprintln(&buf)
121-
fmt.Fprintf(&buf, "const defaultCGO_ENABLED = %q\n", "")
122+
fmt.Fprintf(&buf, "const defaultCGO_ENABLED = %s\n", quote(os.Getenv("CGO_ENABLED")))
122123

123124
writefile(buf.String(), file, writeSkipSame)
124125
}

0 commit comments

Comments
 (0)