Skip to content

Commit

Permalink
Usage of atomic counters for llvm code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Dushistov committed May 11, 2023
1 parent 4d941cd commit 90ce53a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
);
Expand Down

0 comments on commit 90ce53a

Please sign in to comment.