mirror of
https://github.com/hashicorp/vault.git
synced 2026-02-03 20:40:45 -05:00
Occasionally it seems that the tools will get built and linked against the platform glibc. We definitely do not want that. Now we always disable CGO when building tools. While doing this I realized that we could also strip debug symbols and reduce the size of the tools significantly, so that is included as well. Signed-off-by: Ryan Cragun <me@ryan.ec> Co-authored-by: Ryan Cragun <me@ryan.ec>
This commit is contained in:
parent
0671becbd3
commit
f199191f88
1 changed files with 5 additions and 1 deletions
|
|
@ -11,7 +11,11 @@ repo_root() {
|
|||
|
||||
# Install an external Go tool.
|
||||
go_install() {
|
||||
if go install "$1"; then
|
||||
local tags=""
|
||||
if [ "$(go env GOOS)" == "darwin" ]; then
|
||||
tags="netcgo"
|
||||
fi
|
||||
if eval CGO_ENABLED=0 go install "-tags=${tags}" \"-ldflags=-w -s\" "$1"; then
|
||||
echo "--> $1 ✔"
|
||||
else
|
||||
echo "--> $1 ✖"
|
||||
|
|
|
|||
Loading…
Reference in a new issue