]> granicus.if.org Git - clang/commit
[OpenMP][Driver] Put target binary for each offload target into a
authorAlexey Bataev <a.bataev@hotmail.com>
Tue, 30 May 2017 18:57:51 +0000 (18:57 +0000)
committerAlexey Bataev <a.bataev@hotmail.com>
Tue, 30 May 2017 18:57:51 +0000 (18:57 +0000)
commit282baa1df62acdab6961ce62659142be1d29b515
treef0290c9817df6ec7c27ef5d01361f54b6af6dd32
parenta841e133b362a1d46356fc58540bf9c2a5b36e14
[OpenMP][Driver] Put target binary for each offload target into a
separate section, by Sergey Dmitriev

Linker script that is generated by the clang driver for creating fat binary puts target binaries for all offload targets into a single ELF section .omp_offloading. This is not convenient because it greatly complicates operations with the final fat binary once it is linked. For example extracting target binary for a particular target from such fat executable would not be an easy task if you have more than one offload target.

Attached patch changes clang driver to put target binary for each
offload target into a separate ELF section .omp_offloading.<target
triple>.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@304229 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Driver/ToolChains/Gnu.cpp
test/Driver/openmp-offload.c