[PATCH] D102495: [clang][deps] Support inferred modules
Jan Svoboda via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri May 14 06:34:14 PDT 2021
jansvoboda11 created this revision.
jansvoboda11 added reviewers: Bigcheese, dexonsmith.
jansvoboda11 requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
This patch adds support for inferred modules to the dependency scanner.
Effectively a cherry-pick of https://github.com/apple/llvm-project/pull/699 authored by @Bigcheese with libclang and other changes omitted.
Contains following changes:
1. [Clang][ScanDeps] Ignore __inferred_module.map dependency.
- This shows up with inferred modules, but it doesn't exist on disk, so don't report it as a dependency.
2. [Clang][ScanDeps] Use the module map a module was inferred from for inferred modules.
Also includes a smoke test that uses clang-scan-deps output to perform an explicit build. There's no intention to duplicate whatever `test/Modules` contains, just to verify the produced command-line does "work" (with very loose definition of work).
Split from D100934 <https://reviews.llvm.org/D100934>.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D102495
Files:
clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp
clang/test/ClangScanDeps/Inputs/frameworks/Inferred.framework/Frameworks/Sub.framework/Headers/Sub.h
clang/test/ClangScanDeps/Inputs/frameworks/Inferred.framework/Headers/Inferred.h
clang/test/ClangScanDeps/Inputs/frameworks/System.framework/Headers/System.h
clang/test/ClangScanDeps/Inputs/frameworks/System.framework/Modules/module.modulemap
clang/test/ClangScanDeps/Inputs/frameworks/module.modulemap
clang/test/ClangScanDeps/Inputs/modules_inferred_cdb.json
clang/test/ClangScanDeps/modules-full.cpp
clang/test/ClangScanDeps/modules-inferred-explicit-build.m
clang/test/ClangScanDeps/modules-inferred.m
clang/utils/module-deps-to-rsp.py
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102495.345428.patch
Type: text/x-patch
Size: 11890 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210514/8e960b32/attachment.bin>
More information about the cfe-commits
mailing list