[all-commits] [llvm/llvm-project] 7f6af6: [clang][deps] Generate '-fmodule-file=' only for d...

Jan Svoboda via All-commits all-commits at lists.llvm.org
Sat Mar 12 02:41:55 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7f6af607464e5bcf2bd8b7bc7724a5985d7a0c34
      https://github.com/llvm/llvm-project/commit/7f6af607464e5bcf2bd8b7bc7724a5985d7a0c34
  Author: Jan Svoboda <jan_svoboda at apple.com>
  Date:   2022-03-12 (Sat, 12 Mar 2022)

  Changed paths:
    M clang/include/clang/Tooling/DependencyScanning/DependencyScanningTool.h
    M clang/include/clang/Tooling/DependencyScanning/ModuleDepCollector.h
    M clang/lib/Tooling/DependencyScanning/DependencyScanningTool.cpp
    M clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp
    M clang/test/ClangScanDeps/modules-full.cpp
    M clang/test/ClangScanDeps/modules-pch.c
    M clang/tools/clang-scan-deps/ClangScanDeps.cpp

  Log Message:
  -----------
  [clang][deps] Generate '-fmodule-file=' only for direct dependencies

The `clang-scan-deps` tool currently generates `-fmodule-file=` command-line arguments for the whole transitive closure of modular dependencies. This is not necessary, we only need to provide the direct dependencies on the command line. Information about transitive dependencies is stored within the `.pcm` files of direct dependencies. This makes the command lines shorter, but should be a NFC otherwise (unless there are bugs in the loading mechanism for explicit modules).

Depends on D120465.

Reviewed By: Bigcheese

Differential Revision: https://reviews.llvm.org/D118915




More information about the All-commits mailing list