]> granicus.if.org Git - clang/commit
[clang][ifs] Clang Interface Stubs ToolChain plumbing.
authorPuyan Lotfi <puyan@puyan.org>
Wed, 2 Oct 2019 22:50:07 +0000 (22:50 +0000)
committerPuyan Lotfi <puyan@puyan.org>
Wed, 2 Oct 2019 22:50:07 +0000 (22:50 +0000)
commit2b8b74a6ff09a52dcd751e5429f4be32899ae3a3
tree992233c4a6a6d5cd6e6a96aa771282b7da4e4b67
parent6aa1f42be9f8fc0a416590815e92e42cdad60fa3
[clang][ifs] Clang Interface Stubs ToolChain plumbing.

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@373538 91177308-0d34-0410-b5e6-96231b3b80d8
31 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.ifs [new file with mode: 0644]
test/InterfaceStubs/template-namespace-function.cpp
test/InterfaceStubs/weak.cpp
test/lit.cfg.py