Skip to content

Commit

Permalink
build: build cross-compiled binaries in bin/ by default
Browse files Browse the repository at this point in the history
Otherwise GOARCH=386 PASSES="build integration" ./test fail on amd64
because the e2e tests can't find the binaries. Added a BINDIR option
for writing the build output to somewhere else, in case it's needed.
  • Loading branch information
Anthony Romano committed Jul 16, 2016
1 parent 331ec82 commit cb9ee73
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions build
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,8 @@ toggle_failpoints() {
}

etcd_build() {
if [ -z "${GOARCH}" ] || [ "${GOARCH}" = "$(go env GOHOSTARCH)" ]; then
out="bin"
else
out="bin/${GOARCH}"
fi
out="bin"
if [ -n "${BINDIR}" ]; then out="${BINDIR}"; fi
toggle_failpoints
# Static compilation is useful when etcd is run in a container
CGO_ENABLED=0 go build $GO_BUILD_FLAGS -installsuffix cgo -ldflags "-s -X ${REPO_PATH}/cmd/vendor/${REPO_PATH}/version.GitSHA=${GIT_SHA}" -o ${out}/etcd ${REPO_PATH}/cmd
Expand Down

0 comments on commit cb9ee73

Please sign in to comment.