Skip to content

Commit

Permalink
tool/gocross: make all Windows DLLs build with static libgcc
Browse files Browse the repository at this point in the history
In this commit, we have updated the build process for our Windows DLLs
to link statically with libgcc, ensuring our Windows DLLs are self-contained.

Updates tailscale#10617

Signed-off-by: Nick Khyl <nickk@tailscale.com>
  • Loading branch information
nickkhyl committed Dec 19, 2023
1 parent 0957258 commit 5e3126f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tool/gocross/autoflags.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ func autoflagsForTest(argv []string, env *Environment, goroot, nativeGOOS, nativ
cgo = true
buildFlags = append(buildFlags, "-buildmode=c-shared")
ldflags = append(ldflags, "-H", "windows", "-s")
cgoLdflags = append(cgoLdflags, "-static")
var mingwArch string
switch targetArch {
case "amd64":
Expand Down

0 comments on commit 5e3126f

Please sign in to comment.