Skip to content

Commit

Permalink
Merge pull request #2626 from hashicorp/f-remove-win-cgo
Browse files Browse the repository at this point in the history
Update go-winio to remove cgo on Windows
  • Loading branch information
schmichael authored May 9, 2017
2 parents c778fce + 990de0f commit 5804fbe
Show file tree
Hide file tree
Showing 5 changed files with 136 additions and 57 deletions.
8 changes: 6 additions & 2 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,15 @@ for target in $targets; do
;;
"windows_386")
echo "==> Building windows 386..."
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"
CGO_ENABLED=0 GOARCH="386" GOOS="windows" go build -ldflags "-X $LDFLAG" -o "pkg/windows_386/nomad.exe"
# Use the following if CGO is required
#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 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"
CGO_ENABLED=0 GOARCH="amd64" GOOS="windows" go build -ldflags "-X $LDFLAG" -o "pkg/windows_amd64/nomad.exe"
# Use the following if CGO is required
#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..."
Expand Down
151 changes: 106 additions & 45 deletions vendor/github.com/Microsoft/go-winio/file.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 8 additions & 7 deletions vendor/github.com/Microsoft/go-winio/pipe.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions vendor/github.com/Microsoft/go-winio/zsyscall_windows.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions vendor/vendor.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
"revisionTime": "2016-08-22T16:14:30Z"
},
{
"checksumSHA1": "A6wxSCZcKyTwZP9b7ErXPZE3Ijg=",
"checksumSHA1": "Rjy2uYZkQ8Kjht6ZFU0qzm2I/kI=",
"path": "github.com/Microsoft/go-winio",
"revision": "13736c32520969a64987228c21c138a4cfdb3720",
"revisionTime": "2017-05-03T19:50:31Z"
"revision": "d311c76e775b5092c023569caacdbb4e569c3243",
"revisionTime": "2017-05-08T21:01:43Z"
},
{
"checksumSHA1": "XeG94RjA9o/0wo9Fuw6NSRGYnjk=",
Expand Down

0 comments on commit 5804fbe

Please sign in to comment.