← Back to Pull requests

fix(compiler): build clang-scan-deps on all platforms #10167

Closed
unknown closed this pull request without merging on Nov 21, 2026 14:55 UTC
View on GitHub
unknown unknown commented on Nov 20, 2026 10:48 UTC
Author

Summary

Build clang-scan-deps on 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_required is 3.28 or higher. For Clang the scanner is clang-scan-deps, found via CMAKE_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 by if(TARGET ...), so it is dropped silently when the target does not exist. Our tool pruning gated CLANG_SCAN_DEPS behind if(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_RUNTIMES is only compiler-rt, so there is nothing to scan.

Change

CLANG_SCAN_DEPS moves from the Windows-only append into the unconditional _clang_required_tools list. Cost is one translation unit linked against the existing libclang-cpp; ordering is handled upstream via the external project's DEPENDS.

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

Diff: 228 lines (+171 / -57) across 2 files Reviewer: ronlieb Review duration: 1686m
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
0.37
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
60%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
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
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 60.5% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 37.0% (MEDIUM) · Higher = larger blast radius
37.0%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 60.5% · Lower = rushed or shallow review
60.5%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 14.6% · Safe to merge
14.6%
Repository