mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
build: build cross-compiled binaries in bin/ by default
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.
This commit is contained in:
parent
331ec82400
commit
cb9ee7320b
7
build
7
build
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user