summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/ToolChains/InterfaceStubs.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [clang][IFS] Ignoring -Xlinker/-Xclang arguments in InterfaceStubs pass for now.Puyan Lotfi2019-12-041-0/+2
| | | | | | | | | | | Many of the inputs to clang driver toolchain tools can be things other than files such as -Xclang and -Xlinker arguments. For now we don't take such tool pass-through type arguments (although having an -Xifs would be nice to have to replace things like -emit-merged-ifs). So because for the moment we are not doing any sort of argument pass-through, I am going to have InterfaceStubs Merger ignore any non-file type input arguments. Differential Revision: https://reviews.llvm.org/D70838
* [clang][IFS] Driver Pipeline: generate stubs after standard pipeline (3)Puyan Lotfi2019-11-201-6/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | Third Landing Attempt (dropping any linker invocation from clang driver): Up until now, clang interface stubs has replaced the standard PP -> C -> BE -> ASM -> LNK pipeline. With this change, it will happen in conjunction with it. So what when you build your code you will get an a.out or lib.so as well as an interface stub file. Example: clang -shared -o libfoo.so -emit-interface-stubs ... will generate both a libfoo.so and a libfoo.ifso. The .so file will contain the code from the standard compilation pipeline and the .ifso file will contain the ELF stub library. Note: For driver-test.c I've added -S in order to prevent any bot failures on bots that don't have the proper linker for their native triple. You could always specify a triple like x86_64-unknown-linux-gnu and on bots like x86_64-scei-ps4 the clang driver would invoke regular ld instead of getting the error 'Executable "orbis-ld" doesn't exist!' but on bots like ppc64be and s390x you'd get an error "/usr/bin/ld: unrecognised emulation mode: elf_x86_64" Differential Revision: https://reviews.llvm.org/D70274
* Revert "[clang][IFS] Driver Pipeline: generate stubs after standard pipeline ↵Puyan Lotfi2019-11-191-30/+6
| | | | | | (2)" This reverts commit ea8e02822341e2421b94167d828d3f224e767424.
* [clang][IFS] Driver Pipeline: generate stubs after standard pipeline (2)Puyan Lotfi2019-11-191-6/+30
| | | | | | | | | | | | | | | | | | | Second Landing Attempt: Up until now, clang interface stubs has replaced the standard PP -> C -> BE -> ASM -> LNK pipeline. With this change, it will happen in conjunction with it. So what when you build your code you will get an a.out or lib.so as well as an interface stub file. Example: clang -shared -o libfoo.so -emit-interface-stubs ... will generate both a libfoo.so and a libfoo.ifso. The .so file will contain the code from the standard compilation pipeline and the .ifso file will contain the ELF stub library. Differential Revision: https://reviews.llvm.org/D70274
* Revert "[clang][IFS] Driver pipeline: generate interface stubs after ↵Puyan Lotfi2019-11-191-30/+6
| | | | | | | | | standard pipeline." This reverts commit 58ea00b51fe9b011301484957556872fced7dd08. Test for .o + .ifs sidecar files is brittle and failing on bots. Reverting to unblock.
* [clang][IFS] Driver pipeline: generate interface stubs after standard pipeline.Puyan Lotfi2019-11-191-6/+30
| | | | | | | | | | | | | | | | | Up until now, clang interface stubs has replaced the standard PP -> C -> BE -> ASM -> LNK pipeline. With this change, it will happen in conjunction with it. So what when you build your code you will get an a.out or lib.so as well as an interface stub file. Example: clang -shared -o libfoo.so -emit-interface-stubs ... will generate both a libfoo.so and a libfoo.ifso. The .so file will contain the code from the standard compilation pipeline and the .ifso file will contain the ELF stub library. Differential Revision: https://reviews.llvm.org/D70274
* [clang][ifs] Clang Interface Stubs ToolChain plumbing.Puyan Lotfi2019-10-081-0/+37
| | | | | | | | | | | | | | | | | | | | | | | 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
* Revert 373538 and follow-ups 373549 and 373552.Nico Weber2019-10-031-37/+0
| | | | | | They break tests on (at least) macOS. llvm-svn: 373556
* [clang][ifs] Clang Interface Stubs ToolChain plumbing.Puyan Lotfi2019-10-021-0/+37
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: 373538
OpenPOWER on IntegriCloud