Skip to content

Commit

Permalink
[tailscale] 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: Jenny Zhang <[email protected]>
(Cherry-picked from a2f29de)
(cherry picked from commit fa904e1)
  • Loading branch information
danderson authored and bradfitz committed Aug 21, 2024
1 parent b3dc9cc commit 1e42045
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 @@ -7,7 +7,6 @@ package main
import (
"fmt"
"io"
"os"
"path/filepath"
"sort"
"strings"
Expand Down Expand Up @@ -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)
}
Expand Down

0 comments on commit 1e42045

Please sign in to comment.