-
Notifications
You must be signed in to change notification settings - Fork 18.3k
Closed
Closed
Copy link
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.
Milestone
Description
I've been trying to figure out how to make my programs build statically by default without specifying -a -installsuffix cgo -ldflags '-extldflags "-static" -s
for every project. I've read through #9344, and supposedly the change to make dynamic builds the default is only for released versions of Go. Accordingly, I tried the following:
- Install Go onto my system from a package manager
- Check out go1.5.1 from Git
- Set
GOROOT
to point to the checked-out version of Go, andGOROOT_BOOTSTRAP
to the system version of Go cd src; ./all.bash
-- successfulrm -rf $GOPATH/pkg
- Start a new shell with GOPATH, GOROOT, and PATH all set appropriately. I can verify that I'm using the self-compiled version of Go (which itself was built dynamically), but binaries produced with my self-built Go are still being built dynamically without passing in
-a -installsuffix cgo -ldflags '-extldflags "-static" -s
Is this a bug, or did I misinterpret the requirements in #9344?
Thanks!
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.