[all-commits] [llvm/llvm-project] f80a0e: [clang][deps] Split translation units into individ...
Ben Langmuir via All-commits
all-commits at lists.llvm.org
Tue Aug 30 15:44:37 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f80a0ea760728e70f70debf744277bc3aa59bc17
https://github.com/llvm/llvm-project/commit/f80a0ea760728e70f70debf744277bc3aa59bc17
Author: Ben Langmuir <blangmuir at apple.com>
Date: 2022-08-30 (Tue, 30 Aug 2022)
Changed paths:
M clang/include/clang/Tooling/DependencyScanning/DependencyScanningTool.h
M clang/include/clang/Tooling/DependencyScanning/DependencyScanningWorker.h
M clang/include/clang/Tooling/DependencyScanning/ModuleDepCollector.h
M clang/lib/Tooling/DependencyScanning/DependencyScanningTool.cpp
M clang/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp
M clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp
A clang/test/ClangScanDeps/deprecated-driver-api.c
M clang/test/ClangScanDeps/diagnostics.c
M clang/test/ClangScanDeps/header-search-pruning-transitive.c
M clang/test/ClangScanDeps/modules-context-hash-ignore-macros.c
M clang/test/ClangScanDeps/modules-context-hash-outputs.c
M clang/test/ClangScanDeps/modules-context-hash-warnings.c
M clang/test/ClangScanDeps/modules-context-hash.c
M clang/test/ClangScanDeps/modules-dep-args.c
M clang/test/ClangScanDeps/modules-fmodule-name-no-module-built.m
M clang/test/ClangScanDeps/modules-full.cpp
M clang/test/ClangScanDeps/modules-implicit-dot-private.m
M clang/test/ClangScanDeps/modules-incomplete-umbrella.c
M clang/test/ClangScanDeps/modules-inferred.m
M clang/test/ClangScanDeps/modules-no-undeclared-includes.c
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
A clang/test/ClangScanDeps/multiple-commands.c
M clang/test/ClangScanDeps/removed-args.c
M clang/tools/clang-scan-deps/ClangScanDeps.cpp
M clang/utils/module-deps-to-rsp.py
Log Message:
-----------
[clang][deps] Split translation units into individual -cc1 or other commands
Instead of trying to "fix" the original driver invocation by appending
arguments to it, split it into multiple commands, and for each -cc1
command use a CompilerInvocation to give precise control over the
invocation.
This change should make it easier to (in the future) canonicalize the
command-line (e.g. to improve hits in something like ccache), apply
optimizations, or start supporting multi-arch builds, which would
require different modules for each arch.
In the long run it may make sense to treat the TU commands as a
dependency graph, each with their own dependencies on modules or earlier
TU commands, but for now they are simply a list that is executed in
order, and the dependencies are simply duplicated. Since we currently
only support single-arch builds, there is no parallelism available in
the execution.
Differential Revision: https://reviews.llvm.org/D132405
More information about the All-commits
mailing list