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 Sep 5, 2024
1 parent dd6c4be commit 361dc82
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 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: 2 additions & 1 deletion .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ jobs:
rustup component add llvm-tools
- name: Test
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: |
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 361dc82

Please sign in to comment.