Re: [go-nuts] building a linux binary with -race on a mac

2017-02-15 Thread Ian Lance Taylor
On Wed, Feb 15, 2017 at 4:35 AM, Joseph Lorenzini wrote: > > I am writing and building my code on a mac. The code is a linux binary > though so its obviously a cross compilation. This works fine: > > GOOS=linux GOARCH=amd64 go build . > > This does not: > > GOOS=linux GOARCH=amd64 go build -race

[go-nuts] building a linux binary with -race on a mac

2017-02-15 Thread Joseph Lorenzini
All: I am writing and building my code on a mac. The code is a linux binary though so its obviously a cross compilation. This works fine: GOOS=linux GOARCH=amd64 go build . This does not: GOOS=linux GOARCH=amd64 go build -race . go build: -race requires cgo; enable cgo by setting CGO_ENABLED=