diff options
author | Puyan Lotfi <puyan@puyan.org> | 2019-10-08 15:23:14 +0000 |
---|---|---|
committer | Puyan Lotfi <puyan@puyan.org> | 2019-10-08 15:23:14 +0000 |
commit | c382d03ca85d0c93b3e49949006e42314b9d4409 (patch) | |
tree | 066d3effc16bbf439fd1c5d14f2673320a85c474 /clang/lib/Driver/Action.cpp | |
parent | 08daf8cf0a554990caa8a559053c12e41af52dd2 (diff) | |
download | llvm-c382d03ca85d0c93b3e49949006e42314b9d4409.zip llvm-c382d03ca85d0c93b3e49949006e42314b9d4409.tar.gz llvm-c382d03ca85d0c93b3e49949006e42314b9d4409.tar.bz2 |
[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
Diffstat (limited to 'clang/lib/Driver/Action.cpp')
-rw-r--r-- | clang/lib/Driver/Action.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Driver/Action.cpp b/clang/lib/Driver/Action.cpp index 47b03f6..0187cf9 100644 --- a/clang/lib/Driver/Action.cpp +++ b/clang/lib/Driver/Action.cpp @@ -31,6 +31,7 @@ const char *Action::getClassName(ActionClass AC) { case CompileJobClass: return "compiler"; case BackendJobClass: return "backend"; case AssembleJobClass: return "assembler"; + case IfsMergeJobClass: return "interface-stub-merger"; case LinkJobClass: return "linker"; case LipoJobClass: return "lipo"; case DsymutilJobClass: return "dsymutil"; @@ -357,6 +358,11 @@ void AssembleJobAction::anchor() {} AssembleJobAction::AssembleJobAction(Action *Input, types::ID OutputType) : JobAction(AssembleJobClass, Input, OutputType) {} +void IfsMergeJobAction::anchor() {} + +IfsMergeJobAction::IfsMergeJobAction(ActionList &Inputs, types::ID Type) + : JobAction(IfsMergeJobClass, Inputs, Type) {} + void LinkJobAction::anchor() {} LinkJobAction::LinkJobAction(ActionList &Inputs, types::ID Type) |