diff --git a/scripts/cross-compile.sh b/scripts/cross-compile.sh index 3a9e3e31aec..d498361ba5f 100755 --- a/scripts/cross-compile.sh +++ b/scripts/cross-compile.sh @@ -14,8 +14,8 @@ fi for platform in linux-amd64 linux-arm64 linux-ppc64le linux-s390x darwin-amd64 windows-amd64 ; do echo "Cross compiling $platform and placing binary at dist/bin/$platform/" if [ $platform == "windows-amd64" ]; then - GOARCH=amd64 GOOS=windows go build -o dist/bin/$platform/odo.exe -ldflags="$COMMON_FLAGS" ./cmd/odo/ + GOARCH=amd64 GOOS=windows go build -o dist/bin/$platform/odo.exe -ldflags="-s -w $COMMON_FLAGS" ./cmd/odo/ else - GOARCH=${platform#*-} GOOS=${platform%-*} go build -o dist/bin/$platform/odo -ldflags="$COMMON_FLAGS" ./cmd/odo/ + GOARCH=${platform#*-} GOOS=${platform%-*} go build -o dist/bin/$platform/odo -ldflags="-s -w $COMMON_FLAGS" ./cmd/odo/ fi done