[all-commits] [llvm/llvm-project] 80a696: [clang][deps] NFC: Update documentation
Jan Svoboda via All-commits
all-commits at lists.llvm.org
Wed Feb 23 06:46:38 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 80a696898cd57f00297e06714bd5118ce7308f3e
https://github.com/llvm/llvm-project/commit/80a696898cd57f00297e06714bd5118ce7308f3e
Author: Jan Svoboda <jan_svoboda at apple.com>
Date: 2022-02-23 (Wed, 23 Feb 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
Log Message:
-----------
[clang][deps] NFC: Update documentation
In D113473, the dependency scanner stopped emitting "-fmodule-map-file=" arguments. Potential build systems are expected to not add any such arguments on their own. This commit removes mentions of such arguments to avoid confusion.
Commit: 19017c2435d76fe453a2500eeafd045ba92ece67
https://github.com/llvm/llvm-project/commit/19017c2435d76fe453a2500eeafd045ba92ece67
Author: Jan Svoboda <jan_svoboda at apple.com>
Date: 2022-02-23 (Wed, 23 Feb 2022)
Changed paths:
M clang/include/clang/Tooling/DependencyScanning/DependencyScanningTool.h
M clang/lib/Tooling/DependencyScanning/DependencyScanningTool.cpp
M clang/test/ClangScanDeps/diagnostics.c
M clang/test/ClangScanDeps/modules-context-hash.c
M clang/test/ClangScanDeps/modules-fmodule-name-no-module-built.m
M clang/test/ClangScanDeps/modules-full.cpp
M clang/test/ClangScanDeps/modules-inferred-explicit-build.m
M clang/test/ClangScanDeps/modules-inferred.m
M clang/test/ClangScanDeps/modules-pch-common-submodule.c
M clang/test/ClangScanDeps/modules-pch-common-via-submodule.c
M clang/test/ClangScanDeps/modules-pch.c
M clang/test/ClangScanDeps/modules-symlink.c
M clang/tools/clang-scan-deps/ClangScanDeps.cpp
Log Message:
-----------
[clang][deps] Return the whole TU command line
The dependency scanner already generates canonical -cc1 command lines that can be used to compile discovered modular dependencies.
For translation unit command lines, the scanner only generates additional driver arguments the build system is expected to append to the original command line.
While this works most of the time, there are situations where that's not the case. For example with `-Wunused-command-line-argument`, Clang will complain about the `-fmodules-cache-path=` argument that's not being used in explicit modular builds. Combine that with `-Werror` and the build outright fails.
To prevent such failures, this patch changes the dependency scanner to return the full driver command line to compile the original translation unit. This gives us more opportunities to massage the arguments into something reasonable.
Reviewed By: Bigcheese
Differential Revision: https://reviews.llvm.org/D118986
Compare: https://github.com/llvm/llvm-project/compare/365be7ac72a3...19017c2435d7
More information about the All-commits
mailing list