1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-02-20 23:47:21 -05:00

fix broken pie build with generating seperate files (#3281)

This commit is contained in:
Xiaokang Wang (Shelikhoo) 2025-01-14 10:06:23 +00:00 committed by GitHub
parent 54fbeeba6d
commit 4adda5806a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -36,6 +36,8 @@ jobs:
goos: dragonfly goos: dragonfly
- goarch: 386 - goarch: 386
goos: darwin goos: darwin
- goarch: amd64
goos: linux
include: include:
# BEGIN Linux ARM 5 6 7 # BEGIN Linux ARM 5 6 7
- goos: linux - goos: linux
@ -95,6 +97,15 @@ jobs:
goarch: mipsle goarch: mipsle
- goos: linux - goos: linux
goarch: mips goarch: mips
- goos: linux
goarch: arm64
pie: pie
- goos: linux
goarch: amd64
pie: pie
- goos: linux
goarch: amd64
pie:
# END MIPS # END MIPS
# END Other architectures # END Other architectures
fail-fast: false fail-fast: false
@ -104,6 +115,7 @@ jobs:
GOOS: ${{ matrix.goos }} GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }} GOARCH: ${{ matrix.goarch }}
GOARM: ${{ matrix.goarm }} GOARM: ${{ matrix.goarm }}
PIE_ENABLED: ${{ matrix.pie }}
CGO_ENABLED: 0 CGO_ENABLED: 0
steps: steps:
@ -133,15 +145,16 @@ jobs:
mkdir -p build_assets mkdir -p build_assets
EXTRA_ARG="" EXTRA_ARG=""
case "$GOOS-$GOARCH" in case "$GOOS-$GOARCH" in
"linux-386")
;&
"linux-amd64") "linux-amd64")
;& ;&
"linux-arm64") "linux-arm64")
EXTRA_ARG=EXTRA_ARG+"-buildmode=pie" if [ -z $PIE_ENABLED ]
then
EXTRA_ARG=$EXTRA_ARG" -buildmode=pie"
fi
;; ;;
esac esac
go build -v -o build_assets/v2ray -trimpath -ldflags "-s -w -buildid=" ./main go build $EXTRA_ARG -v -o build_assets/v2ray -trimpath -ldflags "-s -w -buildid=" ./main
- name: Rename Windows V2Ray - name: Rename Windows V2Ray
if: matrix.goos == 'windows' if: matrix.goos == 'windows'