]> granicus.if.org Git - clang/commit
[clang][ifs] Clang Interface Stubs ToolChain plumbing.
authorPuyan Lotfi <puyan@puyan.org>
Tue, 8 Oct 2019 15:23:14 +0000 (15:23 +0000)
committerPuyan Lotfi <puyan@puyan.org>
Tue, 8 Oct 2019 15:23:14 +0000 (15:23 +0000)
commit60b59529cc7687aa32855b93e38d9b7d6b0f871c
tree7369e3724bf3252017a67cd6a0209400964ee882
parentf1b82483499f6e23b6752d083e3413bfee298acf
[clang][ifs] Clang Interface Stubs ToolChain plumbing.

Second Landing Attempt:

This patch enables end to end support for generating ELF interface stubs
directly from clang. Now the following:

clang -emit-interface-stubs -o libfoo.so a.cpp b.cpp c.cpp

will product an ELF binary with visible symbols populated. Visibility attributes
and -fvisibility can be used to control what gets populated.

* Adding ToolChain support for clang Driver IFS Merge Phase
* Implementing a default InterfaceStubs Merge clang Tool, used by ToolChain
* Adds support for the clang Driver to involve llvm-ifs on ifs files.
* Adds -emit-merged-ifs flag, to tell llvm-ifs to emit a merged ifs text file
  instead of the final object format (normally ELF)

Differential Revision: https://reviews.llvm.org/D63978

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@374061 91177308-0d34-0410-b5e6-96231b3b80d8
32 files changed:
include/clang/Driver/Action.h
include/clang/Driver/Options.td
include/clang/Driver/Phases.h
include/clang/Driver/ToolChain.h
include/clang/Driver/Types.def
lib/Driver/Action.cpp
lib/Driver/CMakeLists.txt
lib/Driver/Driver.cpp
lib/Driver/Phases.cpp
lib/Driver/ToolChain.cpp
lib/Driver/ToolChains/Clang.cpp
lib/Driver/ToolChains/InterfaceStubs.cpp [new file with mode: 0644]
lib/Driver/ToolChains/InterfaceStubs.h [new file with mode: 0644]
lib/Driver/Types.cpp
lib/Frontend/CompilerInvocation.cpp
test/InterfaceStubs/bad-format.cpp
test/InterfaceStubs/class-template-specialization.cpp
test/InterfaceStubs/conflict-type.ifs [new file with mode: 0644]
test/InterfaceStubs/driver-test.c [new file with mode: 0644]
test/InterfaceStubs/externstatic.c
test/InterfaceStubs/func.ifs [new file with mode: 0644]
test/InterfaceStubs/function-template-specialization.cpp
test/InterfaceStubs/inline.c
test/InterfaceStubs/merge-conflict-test.c [new file with mode: 0644]
test/InterfaceStubs/object-double.c [new file with mode: 0644]
test/InterfaceStubs/object-float.c [new file with mode: 0644]
test/InterfaceStubs/object.c [new file with mode: 0644]
test/InterfaceStubs/object.cpp [deleted file]
test/InterfaceStubs/object.ifs [new file with mode: 0644]
test/InterfaceStubs/template-namespace-function.cpp
test/InterfaceStubs/weak.cpp
test/lit.cfg.py