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)
  • Loading branch information
danderson authored and awly committed Feb 7, 2024
1 parent d88c63d commit fa904e1
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 fa904e1

Please sign in to comment.