Skip to content

Commit 90ce53a

Browse files
committed
Usage of atomic counters for llvm code coverage
1 parent 4d941cd commit 90ce53a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -745,6 +745,9 @@ LLVMRustOptimize(
745745
if (InstrProfileOutput) {
746746
Options.InstrProfileOutput = InstrProfileOutput;
747747
}
748+
// cargo run tests in multhreading mode by default
749+
// so use atomics for coverage counters
750+
Options.Atomic = true;
748751
MPM.addPass(InstrProfiling(Options, false));
749752
}
750753
);

0 commit comments

Comments
 (0)