[all-commits] [llvm/llvm-project] 93a058: [clang][deps] Add argument for customizing PCM paths

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


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

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

  Log Message:
  -----------
  [clang][deps] Add argument for customizing PCM paths

Dependency scanning currently performs an implicit build. When testing that Clang can build modules with the command-lines generated by `clang-scan-deps`, the actual compilation would overwrite artifacts created during the scan, which makes debugging harder than it should be and can lead to errors in multi-step builds.

To prevent this, this patch adds new flag to `clang-scan-deps` that allows developers to customize the directory to use when generating module map paths, instead of always using the module cache. Moreover, the explicit context hash in now part of the PCM path, which will be useful in D102488, where the context hash can change due to command-line pruning.

Reviewed By: Bigcheese

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




More information about the All-commits mailing list