diff options
-rw-r--r-- | ci/build-with-coverage.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ci/build-with-coverage.sh b/ci/build-with-coverage.sh index 9d4dea73..134c9fde 100644 --- a/ci/build-with-coverage.sh +++ b/ci/build-with-coverage.sh @@ -2,6 +2,8 @@ set -eux -o pipefail +clang_version=$(clang --version | head -n 1 | cut -d' ' -f 3) + # Mixed gcc and Rust/LLVM coverage for the C API tests: # https://searchfox.org/mozilla-central/source/browser/config/mozconfigs/linux64/code-coverage#15 export CC="clang" @@ -9,7 +11,7 @@ export CFLAGS="-coverage -ftest-coverage -fprofile-arcs" # RUSTFLAGS: "-Cinstrument-coverage" export RUSTDOCFLAGS="-Cinstrument-coverage" export LLVM_PROFILE_FILE="coverage-profiles/coverage-%p-%m.profraw" -export LDFLAGS="--coverage -L/usr/lib64/clang/14.0.6/lib/linux" +export LDFLAGS="--coverage -L/usr/lib64/clang/$clang_version/lib/linux" export LIBS="-lclang_rt.profile-x86_64" export RUSTC_BOOTSTRAP="1" # hack to make -Zprofile work on the non-nightly compiler export CARGO_INCREMENTAL="0" # -Zprofile (gcov) doesn't like incremental compilation |