On Thu, Sep 21, 2017 at 3:25 PM, <willow.pine.2...@gmail.com> wrote: > Hi, I have a project which requires multiple --ldflags or -ldflags. I > noticed that go build only uses the last --ldflags of the commandline. Is > there a way to pass multiple --ldflags and have them all be in effect?
Use -ldflags once, but pass multiple flags in the single -ldflags option. As it says at https://golang.org/cmd/go, "All the flags that take a list of arguments accept a space-separated list of strings. To embed spaces in an element in the list, surround it with either single or double quotes." Ian -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.