Skip to content

Commit

Permalink
[tailscale1.20] cmd/dist: always default to CGO_ENABLED=""
Browse files Browse the repository at this point in the history
Lets us build a statically linked toolchain that has the same
cgo behavior as the standard dynamic toolchain.

Signed-off-by: David Anderson <[email protected]>
  • Loading branch information
danderson committed Feb 2, 2023
1 parent d977a8c commit a2f29de
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/cmd/dist/buildgo.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ package main

import (
"fmt"
"os"
"path/filepath"
"sort"
"strings"
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit a2f29de

Please sign in to comment.