From 59685e2d6b31ac4c0d126c751a32676bb79bd1d4 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Mon, 16 Oct 2017 19:32:32 -0700 Subject: [PATCH] Fix macOS cross compilation issue. (#2287) --- Makefile | 6 +++--- buildscripts/build.sh | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 3718bc37bb..f3d05cd5d7 100644 --- a/Makefile +++ b/Makefile @@ -53,12 +53,12 @@ deadcode: build: getdeps verifiers @echo "Running $@" - @go build --ldflags $(BUILD_LDFLAGS) + @go build -tags kqueue --ldflags $(BUILD_LDFLAGS) test: build @echo "Running unit tests" - @go test $(GOFLAGS) github.com/minio/mc/cmd... - @go test $(GOFLAGS) github.com/minio/mc/pkg... + @go test $(GOFLAGS) -tags kqueue github.com/minio/mc/cmd... + @go test $(GOFLAGS) -tags kqueue github.com/minio/mc/pkg... @echo "Running functional tests" @(env bash $(PWD)/functional-tests.sh) diff --git a/buildscripts/build.sh b/buildscripts/build.sh index ae36b2f643..34e34eeb73 100755 --- a/buildscripts/build.sh +++ b/buildscripts/build.sh @@ -23,7 +23,7 @@ _init() { fi # List of supported architectures - SUPPORTED_OSARCH='linux/amd64 windows/amd64' + SUPPORTED_OSARCH='linux/amd64 windows/amd64 darwin/amd64' ## System binaries CP=`which cp` @@ -56,7 +56,7 @@ go_build() { release_sha256sum_default="$release_str/$os-$arch/$(basename $package).sha256sum" # Go build to build the binary. - CGO_ENABLED=0 GOOS=$os GOARCH=$arch go build --ldflags "${LDFLAGS}" -o $release_bin + CGO_ENABLED=0 GOOS=$os GOARCH=$arch go build -tags kqueue --ldflags "${LDFLAGS}" -o $release_bin # Create copy if [ $os == "windows" ]; then