mirror of
https://github.com/domcyrus/rustnet.git
synced 2026-01-05 21:40:01 -06:00
fix: combine RUSTFLAGS to include zstd linker flag
This commit is contained in:
11
.github/workflows/release.yml
vendored
11
.github/workflows/release.yml
vendored
@@ -202,16 +202,11 @@ jobs:
|
||||
clang llvm linux-headers git
|
||||
rustup component add rustfmt
|
||||
|
||||
- name: Configure static zstd linking
|
||||
run: |
|
||||
# Fix for elfutils 0.189+ undeclared zstd dependency
|
||||
# See: https://github.com/libbpf/bpftool/issues/152
|
||||
mkdir -p .cargo
|
||||
printf '[target.x86_64-unknown-linux-musl]\nrustflags = ["-C", "link-arg=-l:libzstd.a"]\n' > .cargo/config.toml
|
||||
|
||||
- name: Build static binary
|
||||
env:
|
||||
RUSTFLAGS: "-C strip=symbols"
|
||||
# -C strip=symbols: Strip debug symbols for smaller binary
|
||||
# -C link-arg=-l:libzstd.a: Fix elfutils 0.189+ zstd dependency (libbpf/bpftool#152)
|
||||
RUSTFLAGS: "-C strip=symbols -C link-arg=-l:libzstd.a"
|
||||
run: cargo build --release
|
||||
|
||||
- name: Verify static linking
|
||||
|
||||
11
.github/workflows/test-static-build.yml
vendored
11
.github/workflows/test-static-build.yml
vendored
@@ -30,16 +30,11 @@ jobs:
|
||||
clang llvm linux-headers git
|
||||
rustup component add rustfmt
|
||||
|
||||
- name: Configure static zstd linking
|
||||
run: |
|
||||
# Fix for elfutils 0.189+ undeclared zstd dependency
|
||||
# See: https://github.com/libbpf/bpftool/issues/152
|
||||
mkdir -p .cargo
|
||||
printf '[target.x86_64-unknown-linux-musl]\nrustflags = ["-C", "link-arg=-l:libzstd.a"]\n' > .cargo/config.toml
|
||||
|
||||
- name: Build static binary
|
||||
env:
|
||||
RUSTFLAGS: "-C strip=symbols"
|
||||
# -C strip=symbols: Strip debug symbols for smaller binary
|
||||
# -C link-arg=-l:libzstd.a: Fix elfutils 0.189+ zstd dependency (libbpf/bpftool#152)
|
||||
RUSTFLAGS: "-C strip=symbols -C link-arg=-l:libzstd.a"
|
||||
run: cargo build --release
|
||||
|
||||
- name: Verify static linking
|
||||
|
||||
Reference in New Issue
Block a user