We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
go version
go version go1.11 linux/amd64
yes
Running GOFLAGS="-ldflags '-w -s'" go build pkgname produces an error with go 1.11 (used to work fine with 1.10):
GOFLAGS="-ldflags '-w -s'" go build pkgname
go: parsing $GOFLAGS: non-flag "'-w"
The flag still works when passed directly to go build, but if the env var is set, the compilation fails.
The text was updated successfully, but these errors were encountered:
cc @bcmills
Sorry, something went wrong.
You are setting the flags incorrectly. https://tip.golang.org/cmd/go/#hdr-Environment_variables
Each flag need to be space-separated and standalone. GOFLAGS="-ldflags=-w -ldflags=-s".
GOFLAGS="-ldflags=-w -ldflags=-s"
Also see - #27282
No branches or pull requests
What version of Go are you using (
go version
)?go version go1.11 linux/amd64
Does this issue reproduce with the latest release?
yes
What did you do?
Running
GOFLAGS="-ldflags '-w -s'" go build pkgname
produces an error with go 1.11 (used to work fine with 1.10):The flag still works when passed directly to go build, but if the env var is set, the compilation fails.
The text was updated successfully, but these errors were encountered: