Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c09ff35476
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if ($env:VSINSTALLDIR -and | ||
| -not (Get-Command "llvm-cov" -ErrorAction SilentlyContinue)) { |
There was a problem hiding this comment.
Add VS LLVM bin when either coverage tool is missing
The PATH bootstrap only runs when llvm-cov is absent, but the script later requires both llvm-cov and llvm-profdata. On machines where llvm-cov is already on PATH (for example from another LLVM install) but llvm-profdata is missing or version-mismatched, this block skips adding Visual Studio's LLVM bin and the run fails or mixes incompatible tool versions. Gate this on both tools (or always prepend VS LLVM when VSINSTALLDIR is set) so the toolchain is consistent.
Useful? React with 👍 / 👎.
| # ── merge profile data ──────────────────────────────────────────────────────── | ||
| Write-Host "" | ||
| Write-Host "=== Merge profile data ===" | ||
| llvm-profdata merge -sparse $ProfRaw -o $ProfData |
There was a problem hiding this comment.
Prevent stale profraw reuse before merge
The merge step unconditionally consumes coverage.profraw without ensuring it was produced by the current test run. If a previous run left coverage.profraw behind and the current run crashes or exits before flushing profile data, llvm-profdata merge will still succeed on stale data and produce an incorrect coverage report for this invocation. Remove any existing raw profile before running tests (or verify fresh timestamp/existence after test execution) to avoid reporting outdated coverage.
Useful? React with 👍 / 👎.
Overview
Introduce LLVM-based source coverage measurement for
greenflame_coreusing Clang's instrumentation-based coverage (llvm-cov).Changes
GREENFLAME_ENABLE_COVERAGEoption that applies-fprofile-instr-generate -fcoverage-mappingflags togreenflame_corewhen enabledgreenflame_testswhen coverage is enabledx64-coverage-clangpreset with coverage instrumentation enabledLLVM_PROFILE_FILEsetllvm-profdatasrc/greenflame_core/Usage
Requires Clang compiler and LLVM tools from Visual Studio's "C++ Clang compiler for Windows" component.