From 2618e7307e9daae1b4e978cfbe9c3bc5c0d7beb1 Mon Sep 17 00:00:00 2001 From: Teddysun Date: Tue, 24 Aug 2021 18:43:02 +0900 Subject: [PATCH] Update build_v2ray.sh --- docker/v2ray/build_v2ray.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docker/v2ray/build_v2ray.sh b/docker/v2ray/build_v2ray.sh index 914e531..d9b8073 100644 --- a/docker/v2ray/build_v2ray.sh +++ b/docker/v2ray/build_v2ray.sh @@ -4,7 +4,7 @@ # # Supported architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, s390x # -# Copyright (C) 2020 Teddysun +# Copyright (C) 2020 - 2021 Teddysun # # Reference URL: # https://github.com/v2fly/v2ray-core.git @@ -22,7 +22,7 @@ cd ${cur_dir} git clone https://github.com/v2fly/v2ray-core.git cd v2ray-core || exit 2 -LDFLAGS="-s -w" +LDFLAGS="-s -w -buildid=" ARCHS=( 386 amd64 arm arm64 ppc64le s390x ) ARMS=( 6 7 ) @@ -30,13 +30,13 @@ for ARCH in ${ARCHS[@]}; do if [ "${ARCH}" = "arm" ]; then for V in ${ARMS[@]}; do echo "Building v2ray_linux_${ARCH}${V} and v2ctl_linux_${ARCH}${V}" - env CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} GOARM=${V} go build -v -ldflags "${LDFLAGS}" -o ${cur_dir}/v2ray_linux_${ARCH}${V} ./main - env CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} GOARM=${V} go build -v -ldflags "${LDFLAGS}" -tags confonly -o ${cur_dir}/v2ctl_linux_${ARCH}${V} ./infra/control/main + env CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} GOARM=${V} go build -v -trimpath -ldflags "${LDFLAGS}" -o ${cur_dir}/v2ray_linux_${ARCH}${V} ./main + env CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} GOARM=${V} go build -v -trimpath -ldflags "${LDFLAGS}" -tags confonly -o ${cur_dir}/v2ctl_linux_${ARCH}${V} ./infra/control/main done else echo "Building v2ray_linux_${ARCH} and v2ctl_linux_${ARCH}" - env CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} go build -v -ldflags "${LDFLAGS}" -o ${cur_dir}/v2ray_linux_${ARCH} ./main - env CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} go build -v -ldflags "${LDFLAGS}" -tags confonly -o ${cur_dir}/v2ctl_linux_${ARCH} ./infra/control/main + env CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} go build -v -trimpath -ldflags "${LDFLAGS}" -o ${cur_dir}/v2ray_linux_${ARCH} ./main + env CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} go build -v -trimpath -ldflags "${LDFLAGS}" -tags confonly -o ${cur_dir}/v2ctl_linux_${ARCH} ./infra/control/main fi done