Skip to content

Commit

Permalink
Add -Clink-dead-code to avoid warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
cschwan committed Oct 4, 2024
1 parent a3a0804 commit 76a1e89
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/capi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ jobs:

- name: Install PineAPPL's C API
env:
RUSTFLAGS: '-Cinstrument-coverage'
# `-C link-dead-code` is needed to prevent 'warning: XX functions have mismatched data' warnings
RUSTFLAGS: '-Cinstrument-coverage -Clink-dead-code'
run: |
cargo cinstall --verbose --prefix=/usr/local/ --libdir=lib --manifest-path pineappl_capi/Cargo.toml
ldconfig
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Test
env:
# `-C link-dead-code` is needed to prevent 'warning: XX functions have mismatched data' warnings
RUSTFLAGS: '-Cinstrument-coverage -Clink-dead-code'
run: |
cd pineappl_py
python -m venv env
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ jobs:
- name: Run tests
env:
RUSTFLAGS: '-Cinstrument-coverage'
# `-C link-dead-code` is needed to prevent 'warning: XX functions have mismatched data' warnings
RUSTFLAGS: '-Cinstrument-coverage -Clink-dead-code'
run: |
# we need stderr, but we can't run test twice because it'll regenerate/modify the binaries which interferes with `llvm-cov`
cargo test --features=applgrid,evolve,fastnlo,fktable --no-fail-fast 2> >(tee stderr 1>&2)
Expand Down

0 comments on commit 76a1e89

Please sign in to comment.