mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
build, test: don't pass -a flag for go build during ordinal building
./build takes long time. On my Core i5 box, it requires almost 25 seconds. Without -a flag, it takes almost 15 seconds. Therefore this commit reduces the flag in default. ./test activates -a via a new env var GO_BUILD_FLAGS.
This commit is contained in:
parent
f368639f00
commit
e4d2ff3bd9
4
build
4
build
@ -29,5 +29,5 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Static compilation is useful when etcd is run in a container
|
# Static compilation is useful when etcd is run in a container
|
||||||
CGO_ENABLED=0 go build -a -installsuffix cgo -ldflags "-s -X ${REPO_PATH}/version.GitSHA${LINK_OPERATOR}${GIT_SHA}" -o bin/etcd ${REPO_PATH}
|
CGO_ENABLED=0 go build $GO_BUILD_FLAGS -installsuffix cgo -ldflags "-s -X ${REPO_PATH}/version.GitSHA${LINK_OPERATOR}${GIT_SHA}" -o bin/etcd ${REPO_PATH}
|
||||||
CGO_ENABLED=0 go build -a -installsuffix cgo -ldflags "-s" -o bin/etcdctl ${REPO_PATH}/etcdctl
|
CGO_ENABLED=0 go build $GO_BUILD_FLAGS -installsuffix cgo -ldflags "-s" -o bin/etcdctl ${REPO_PATH}/etcdctl
|
||||||
|
1
test
1
test
@ -13,6 +13,7 @@ set -e
|
|||||||
# Invoke ./cover for HTML output
|
# Invoke ./cover for HTML output
|
||||||
COVER=${COVER:-"-cover"}
|
COVER=${COVER:-"-cover"}
|
||||||
|
|
||||||
|
GO_BUILD_FLAGS=-a
|
||||||
source ./build
|
source ./build
|
||||||
|
|
||||||
# Hack: gofmt ./ will recursively check the .git directory. So use *.go for gofmt.
|
# Hack: gofmt ./ will recursively check the .git directory. So use *.go for gofmt.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user