cmd/go: CGO_CFLAGS variable with spaces is parsed incorrectly on windows #45637
Labels
help wanted
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using?
windows10, amd64, intel
go env
OutputWhat did you do?
While attempting to build a cgo project on windows, I am finding that the value
CGO_CFLAGS
is parsed incorrectly if an include path contains spaces.I've also tried various combinations of quoting and escaping with no change in result:
What did you expect to see?
I would expect the full single string value of "C:/Program Files/Foo" to be passed to the "-I" include flag when compiling.
What did you see instead?
The path is split on spaces, acting like multiple arguments to
gcc
The text was updated successfully, but these errors were encountered: