On Sat, Aug 20, 2016 at 3:20 PM,  <jose.vazq...@canonical.com> wrote:
> I was trying to compare the results of go tool compare for different
> GOOS+GOARCH values.
>
> It produced code for my current default GOOS+GOARCH (darwin+amd64) but
> failed when I tried another:
>
> $ GOOS=linux GOARCH=arm go tool compile -S countdown.go
> countdown.go:3: can't find import: "fmt"
>
> Seems go tool compile won't compile the dependencies on the give os+arch for
> me, but expect them to be there.
>
> Can you explain why is this happening?
> (I am guessing go tool compile is quite low level and works just on my
> current package)
>
> How can I get several GOOS+GOARCHES (on the same machine) assembly outputs
> from my program?

`go tool compile` just invokes the compiler and nothing else.

I would suggest first

GOOS=linux GOARCH=arm go build -i countdown.go

That should install the dependencies.  Then you should be able to use
`go tool compile`.

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.

Reply via email to