When a project uses PCH with explicit modules, the build will look like this: 1. scan PCH dependencies 2. explicitly build PCH 3. scan TU dependencies 4. explicitly build TU Step 2 produces an object file for the PCH, which the dependency scanner needs to read in step 3. This patch adds support for this. The `clang-scan-deps` invocation in the attached test would fail without this change. Depends on D103516. Reviewed By: Bigcheese Differential Revision: https://reviews.llvm.org/D103519
29 lines
464 B
CMake
29 lines
464 B
CMake
set(LLVM_LINK_COMPONENTS
|
|
${LLVM_TARGETS_TO_BUILD}
|
|
Core
|
|
Support
|
|
)
|
|
|
|
add_clang_library(clangDependencyScanning
|
|
DependencyScanningFilesystem.cpp
|
|
DependencyScanningService.cpp
|
|
DependencyScanningWorker.cpp
|
|
DependencyScanningTool.cpp
|
|
ModuleDepCollector.cpp
|
|
|
|
DEPENDS
|
|
ClangDriverOptions
|
|
|
|
LINK_LIBS
|
|
clangAST
|
|
clangBasic
|
|
clangCodeGen
|
|
clangDriver
|
|
clangFrontend
|
|
clangFrontendTool
|
|
clangLex
|
|
clangParse
|
|
clangSerialization
|
|
clangTooling
|
|
)
|