diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e902433..f7604eb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 diff --git a/.github/workflows/test-static-build.yml b/.github/workflows/test-static-build.yml index a57ae84..eea8458 100644 --- a/.github/workflows/test-static-build.yml +++ b/.github/workflows/test-static-build.yml @@ -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