[all-commits] [llvm/llvm-project] 09e989: [clang][InstallAPI] Introduce basic driver to wri...
Cyndy Ishida via All-commits
all-commits at lists.llvm.org
Tue Feb 13 18:52:22 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 09e98950bfcff7ad376922932efb2b56e4db9898
https://github.com/llvm/llvm-project/commit/09e98950bfcff7ad376922932efb2b56e4db9898
Author: Cyndy Ishida <cyndy_ishida at apple.com>
Date: 2024-02-13 (Tue, 13 Feb 2024)
Changed paths:
M clang/include/clang/Basic/DiagnosticDriverKinds.td
M clang/include/clang/Driver/Action.h
M clang/include/clang/Driver/Options.td
M clang/include/clang/Driver/Types.def
M clang/include/clang/Frontend/CompilerInstance.h
M clang/include/clang/Frontend/CompilerInvocation.h
M clang/include/clang/Frontend/FrontendActions.h
M clang/include/clang/Frontend/FrontendOptions.h
A clang/include/clang/Frontend/InstallAPIOptions.h
A clang/include/clang/InstallAPI/Context.h
M clang/lib/CMakeLists.txt
M clang/lib/Driver/Action.cpp
M clang/lib/Driver/Driver.cpp
M clang/lib/Driver/ToolChain.cpp
M clang/lib/Driver/ToolChains/Clang.cpp
M clang/lib/Frontend/CMakeLists.txt
M clang/lib/Frontend/CompilerInvocation.cpp
A clang/lib/Frontend/InstallAPIConsumer.cpp
M clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp
A clang/lib/InstallAPI/CMakeLists.txt
A clang/lib/InstallAPI/Context.cpp
M clang/test/CMakeLists.txt
A clang/test/Driver/installapi.h
A clang/test/InstallAPI/installapi-basic.test
M clang/test/lit.cfg.py
Log Message:
-----------
[clang][InstallAPI] Introduce basic driver to write out tbd files (#81571)
This introduces a basic outline of installapi as a clang driver option.
It captures relevant information as cc1 args, which are common arguments
already passed to the linker to encode into TBD file outputs. This is
effectively an upstream for what already exists as `tapi installapi` in
Xcode toolchains, but directly in Clang. This patch does not handle any
AST traversing on input yet.
InstallAPI is broadly an operation that takes a series of header files
that represent a single dynamic library and generates a TBD file out of
it which represents all the linkable symbols and necessary attributes
for statically linking in clients. It is the linkable object in all
Apple SDKs and when building dylibs in Xcode. `clang -installapi` also
will support verification where it compares all the information recorded
for the TBD files against the already built binary, to catch possible
mismatches like when a declaration is missing a definition for an
exported symbol.
More information about the All-commits
mailing list