If I invoke go build like this:
CC='/bin/true test test' go build -x -ldflags "-v -linkmode=external"
github.com/x/x/cmd/x
This is how go build later executes this:
host link: "/bin/true" "-m64" "-gdwarf-2" "-o" "/tmp/go-build680348205/
github.com/x/x/cmd/x/_obj/exe/a.out" "-rdynamic"
"/tmp/go-link-007899183/000000.o" "/tmp/go-link-007899183/000001.o"
"/tmp/go-link-007899183/go.o" "-g" "-O2" "-g" "-O2" "-lpthread"
Note how my two "test" arguments are just silently discarded.
Surely this is a bug?
My actual use case is that with the compile I have I need to supply
arguments for the compilation/linking to work at all. The way I worked
around it for now is to move the arguments to -extldflags, but I would
prefer if CC worked the same as it does everywhere else.
Thanks,
Christian
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.