Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/cgo: FFLAGS directive is ignored #18975
What did you do?
Trying to pass FFLAGS to go compiler using cgo directive. It seems go is ignoring the flag. Here's a minimal example.
What did you expect to see?
Expected to see a compile error (since -wrong-flag is passed to the compiler).
What did you see instead?
Compiled successfully, -wrong-flag is not passed to the compiler.
Passing CGO_FFLAGS="-wrong-flag" produces the desirable effect; so FFLAGS is only ignored as a cgo directive.
Does this issue reproduce with the latest release (go1.7.5)?