You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hg id
037a28ab0725 tip
see:
https://code.google.com/p/go/source/browse/src/cmd/ld/doc.go#91
Something like
go build -ldflags "-v -linkmode=external -extldflags=-v -static"
or
go build -ldflags "-v -linkmode=external -extldflags=\"-v -static\""
or
go build -ldflags "-v -linkmode=external -extldflags='-v -static'"
or
I'm lost here ...
gives
go/pkg/tool/linux_amd64/6l: unknown flag -static
Calling the "linker" directly works as expected:
go tool 6l -o $WORK/assets/test1/_obj/exe/a.out -L $WORK -v -linkmode=external
-extldflags="-v -static" $WORK/assets/test1.a
The text was updated successfully, but these errors were encountered:
You need to quote the whole option.
go build -ldflags "-v -linkmode=external '-extldflags=-v -static'"
or
go build -ldflags "-v -linkmode=external \"-extldflags=-v -static\""
by capnm9:
The text was updated successfully, but these errors were encountered: