[clang] [clang][modules-driver] Add dependency scan and dependency graph (PR #152770)
Michael Spencer via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 1 14:54:35 PDT 2025
================
@@ -99,5 +100,6 @@ add_clang_library(clangDriver
LINK_LIBS
clangBasic
clangLex
+ clangDependencyScanning
----------------
Bigcheese wrote:
As mentioned in my previous comment, this causes a cycle because clangDependencyScanning depends on clangDriver. This is fine when statically linking, but will fail with dynamic linking which we support.
This is only used by `DependencyScanningWorker::scanDependencies` to handle driver commands. To fix this I think it would be best to remove this dependency and instead have `scanDependencies` only work on frontend commands. I would then add a function to `clangDriver` that takes a `DependencyScanningWorker` and runs the scanner on all of frontend jobs, this would then be used to replace calls to `scanDependencies`.
This will need to be handled before this PR lands to avoid build issues.
https://github.com/llvm/llvm-project/pull/152770
More information about the cfe-commits
mailing list