go-winio now requires cgo which requires mingw

This commit is contained in:
Michael Schurter 2017-05-03 17:09:12 -07:00
parent fc68234b73
commit a2a8af471a
2 changed files with 4 additions and 3 deletions

3
Vagrantfile vendored
View File

@ -20,7 +20,8 @@ sudo DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential curl git-
liblxc1 lxc-dev lxc-templates \
gcc-5-aarch64-linux-gnu binutils-aarch64-linux-gnu \
libc6-dev-i386 linux-libc-dev:i386 \
gcc-5-arm-linux-gnueabihf gcc-5-multilib-arm-linux-gnueabihf binutils-arm-linux-gnueabihf
gcc-5-arm-linux-gnueabihf gcc-5-multilib-arm-linux-gnueabihf binutils-arm-linux-gnueabihf \
gcc-mingw-w64 binutils-mingw-w64
# Setup go, for development of Nomad
SRCROOT="/opt/go"

View File

@ -64,11 +64,11 @@ for target in $targets; do
;;
"windows_386")
echo "==> Building windows 386..."
CGO_ENABLED=1 GOARCH="386" GOOS="windows" go build -ldflags "-X $LDFLAG" -o "pkg/windows_386/nomad.exe"
CGO_ENABLED=1 CXX=i686-w64-mingw32-g++ CC=i686-w64-mingw32-gcc GOARCH="386" GOOS="windows" go build -ldflags "-X $LDFLAG" -o "pkg/windows_386/nomad.exe"
;;
"windows_amd64")
echo "==> Building windows amd64..."
CGO_ENABLED=1 GOARCH="amd64" GOOS="windows" go build -ldflags "-X $LDFLAG" -o "pkg/windows_amd64/nomad.exe"
CGO_ENABLED=1 CXX=x86_64-w64-mingw32-g++ CC=x86_64-w64-mingw32-gcc GOARCH="amd64" GOOS="windows" go build -ldflags "-X $LDFLAG" -o "pkg/windows_amd64/nomad.exe"
;;
"darwin_amd64")
echo "==> Building darwin amd64..."