cmd/go: difficult to diagnose when build constraints are not followed by a blank line #36510
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
WaitingForInfo
Issue is not actionable because of missing required information, which needs to be provided.
Milestone
go version go1.13.5 windows/amd64
I have the package wich contains two files, one for windows and other for unix.
it is github.com/brimstone/go-shellcode
when I try to build them on windows, i get this error:
exec: "gcc": executable file not found in %PATH%
the windows implementation contains only pure go code, but unix version have some c code in it, and go tries to process this code with help of gcc.
but this file contains _unix in it's name, and there are build tag "// +build linux freebsd darwin" inside it.
so, from go build rules, this file should not be processed by any way.
so, I think, the processing stages are ordered incorrectly, because, as I think, build tag processor should run firstly and, if build tags or simply file names signals to don't process this file, simply close it instantly and don't use it in next processing, and only then run gcc and other stages for remaining files.
and when I delete the unix implementation file, windows version builds perfectly.
The text was updated successfully, but these errors were encountered: