[all-commits] [llvm/llvm-project] de07b1: [clang][deps] Support object files

Jan Svoboda via All-commits all-commits at lists.llvm.org
Fri Jun 4 05:59:04 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: de07b1e84d8de948304766df602fee2b845e9532
      https://github.com/llvm/llvm-project/commit/de07b1e84d8de948304766df602fee2b845e9532
  Author: Jan Svoboda <jan_svoboda at apple.com>
  Date:   2021-06-04 (Fri, 04 Jun 2021)

  Changed paths:
    M clang/lib/Tooling/DependencyScanning/CMakeLists.txt
    M clang/lib/Tooling/DependencyScanning/DependencyScanningService.cpp
    M clang/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp
    A clang/test/ClangScanDeps/Inputs/modules-pch/cdb_tu.json
    A clang/test/ClangScanDeps/Inputs/modules-pch/mod_tu.h
    A clang/test/ClangScanDeps/Inputs/modules-pch/module.modulemap
    A clang/test/ClangScanDeps/Inputs/modules-pch/pch.h
    A clang/test/ClangScanDeps/Inputs/modules-pch/tu.c
    A clang/test/ClangScanDeps/modules-pch.c

  Log Message:
  -----------
  [clang][deps] Support object files

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




More information about the All-commits mailing list