fix(compiler): build clang-scan-deps on all platforms #10167
All Vouch review confidence checks passed
Residual risk 0.15 = Change Risk (0.37) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.37 · 228 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.325
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #10167"
general
weight: 0.35
ronlieb
Summary
Build
clang-scan-depson all platforms instead of only on Windows.Why
CMake policy CMP0155 (CMake 3.28) scans C++ sources for module imports in any target built at C++20 or later, and it turns on automatically once
cmake_minimum_requiredis 3.28 or higher. For Clang the scanner isclang-scan-deps, found viaCMAKE_CXX_COMPILER_CLANG_SCAN_DEPS. The LLVM runtimes (libcxx,libcxxabi,libc) build at-std=c++23, so they are in scope.LLVM already handles this by putting the scanner in the runtimes' default
TOOLCHAIN_TOOLS— but that list is filtered byif(TARGET ...), so it is dropped silently when the target does not exist. Our tool pruning gatedCLANG_SCAN_DEPSbehindif(WIN32), so on Linux the target never existed and the variable stayed unset. CMake interpolates it into the scan command unvalidated, so every source file fails at build time with/bin/sh: CMAKE_CXX_COMPILER_CLANG_SCAN_DEPS-NOTFOUND: command not found.Windows was unaffected: it already built the tool, and its
LLVM_ENABLE_RUNTIMESis onlycompiler-rt, so there is nothing to scan.Change
CLANG_SCAN_DEPSmoves from the Windows-only append into the unconditional_clang_required_toolslist. Cost is one translation unit linked against the existinglibclang-cpp; ordering is handled upstream via the external project'sDEPENDS.Testing
Full Linux compiler + runtimes build pinned to the LLVM revision that raised the minimum CMake version: runtimes configure and compile, blocking Comgr tests pass, packaging and artifact push complete. Windows unchanged.
Failed run - https://github.com/ROCm/TheRock/actions/runs/44681970042/job/136227405600
Passing run - https://github.com/ROCm/TheRock/actions/runs/44712190764/job/136207437871
JIRA ID: LCOMPILER-3193