This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP][Driver] Put target binary for each offload target into a separate section
ClosedPublic

Authored by sdmitriev on May 16 2017, 1:28 PM.

Details

Summary

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>.

Diff Detail

Event Timeline

sdmitriev created this revision.May 16 2017, 1:28 PM
This revision is now accepted and ready to land.May 30 2017, 7:00 AM

I do not have commit access yet. Can you please check it in?

This revision was automatically updated to reflect the committed changes.