[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)
commitc382d03ca85d0c93b3e49949006e42314b9d4409
tree066d3effc16bbf439fd1c5d14f2673320a85c474
parent08daf8cf0a554990caa8a559053c12e41af52dd2
[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

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