doc: update llvm based coverage example

On some systems the old example of using xargs to pass list of profraw
files can exceed xargs's argument limit resulting in multiple executions
of llvm-profdata merge command which overwrites it's output file losing
coverage information. Switch to using a file with a list of filenames.
This commit is contained in:
Max Edwards
2026-04-24 15:55:16 -04:00
parent 2d5ab09f0d
commit ef21e29298

View File

@@ -457,7 +457,8 @@ LLVM_PROFILE_FILE="$(pwd)/build/raw_profile_data/%m_%p.profraw" ctest --test-dir
LLVM_PROFILE_FILE="$(pwd)/build/raw_profile_data/%m_%p.profraw" build/test/functional/test_runner.py # Append "-j N" here for N parallel jobs
# Merge all the raw profile data into a single file
find build/raw_profile_data -name "*.profraw" | xargs llvm-profdata merge -o build/coverage.profdata
find build/raw_profile_data -name "*.profraw" > build/raw_profile_data_files.txt
llvm-profdata merge -f build/raw_profile_data_files.txt -o build/coverage.profdata
```
> **Note:** The "counter mismatch" warning can be safely ignored, though it can be resolved by updating to Clang 19.