1
Fork 0

Usage of atomic counters for llvm code coverage

This commit is contained in:
Evgeniy A. Dushistov 2023-05-11 17:35:01 +03:00
parent 4d941cd981
commit 6b58ff5cdf
2 changed files with 4 additions and 1 deletions

View file

@ -745,6 +745,9 @@ LLVMRustOptimize(
if (InstrProfileOutput) {
Options.InstrProfileOutput = InstrProfileOutput;
}
// cargo run tests in multhreading mode by default
// so use atomics for coverage counters
Options.Atomic = true;
MPM.addPass(InstrProfiling(Options, false));
}
);