[go-nuts] Cross compilation to see assembly outputs with go tool compile

2016-08-20 Thread jose . vazquez
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

Re: [go-nuts] Cross compilation to see assembly outputs with go tool compile

2016-08-20 Thread Ian Lance Taylor
On Sat, Aug 20, 2016 at 3:20 PM, 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.g

Re: [go-nuts] Cross compilation to see assembly outputs with go tool compile

2016-08-20 Thread Aram Hăvărneanu
You might also be interested in GOOS=linux GOARCH=arm go build -gcflags='-S' foo or GOOS=linux GOARCH=arm go build -gcflags='-S' -asmflags='-S' foo -- Aram Hăvărneanu -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe fro

Re: [go-nuts] Cross compilation to see assembly outputs with go tool compile

2016-08-21 Thread jose . vazquez
Thanks Ian! That makes sense and the -i flag worked. On Sunday, August 21, 2016 at 12:49:38 AM UTC+1, Ian Lance Taylor wrote: > > On Sat, Aug 20, 2016 at 3:20 PM, > > wrote: > > I was trying to compare the results of go tool compare for different > > GOOS+GOARCH values. > > > > It produced

Re: [go-nuts] Cross compilation to see assembly outputs with go tool compile

2016-08-21 Thread jose . vazquez
Thanks, that worked too! On Sunday, August 21, 2016 at 1:20:47 AM UTC+1, Aram Hăvărneanu wrote: > > You might also be interested in > > GOOS=linux GOARCH=arm go build -gcflags='-S' foo > > or > > GOOS=linux GOARCH=arm go build -gcflags='-S' -asmflags='-S' foo > > -- > Aram Hăvărneanu