[PATCH] D129389: [clang][deps] Override dependency and serialized diag files for modules
Ben Langmuir via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 8 12:20:13 PDT 2022
benlangmuir created this revision.
benlangmuir added reviewers: jansvoboda11, Bigcheese.
Herald added a project: All.
benlangmuir requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
When building modules, override secondary outputs (dependency file, dependency targets, serialized diagnostic file) in addition to the pcm file path. This avoids inheriting per-TU command-line options that cause non-determinism in the results (non-deterministic command-line for the module build, non-determinism in which TU's .diag and .d files will contain the module outputs). In clang-scan-deps we infer whether to generate dependency or serialized diagnostic files based on an original command-line. In a real build system this should be modeled explicitly.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D129389
Files:
clang/include/clang/Tooling/DependencyScanning/DependencyScanningTool.h
clang/include/clang/Tooling/DependencyScanning/ModuleDepCollector.h
clang/lib/Tooling/DependencyScanning/DependencyScanningTool.cpp
clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp
clang/test/ClangScanDeps/Inputs/removed-args/cdb.json.template
clang/test/ClangScanDeps/generate-modules-path-args.c
clang/test/ClangScanDeps/preserved-args.c
clang/test/ClangScanDeps/removed-args.c
clang/tools/clang-scan-deps/ClangScanDeps.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129389.443319.patch
Type: text/x-patch
Size: 14290 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220708/66783298/attachment.bin>
More information about the cfe-commits
mailing list