diff --git a/.github/workflows/capi.yaml b/.github/workflows/capi.yaml index 49cdf51e..c89ca0e5 100644 --- a/.github/workflows/capi.yaml +++ b/.github/workflows/capi.yaml @@ -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 diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 6da678cd..6d8fe1fa 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -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 diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index a76a9828..1023a4aa 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -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)