[Driver][OpenMP][CUDA] Add capability to bundle object files in sections of the host binary format.
Summary: This patch adds the capability to bundle object files in sections of the host binary using a designated naming convention for these sections. This patch uses the functionality of the object reader already in the LLVM library to read bundled files, and invokes clang with the incremental linking options to create bundle files. Bundling files involves creating an IR file with the contents of the bundle assigned as initializers of globals binded to the designated sections. This way the bundling implementation is agnostic of the host object format. The features added by this patch were requested in the RFC discussion in http://lists.llvm.org/pipermail/cfe-dev/2016-February/047547.html. Reviewers: echristo, tra, jlebar, hfinkel, ABataev, Hahnfeld Subscribers: mkuron, whchung, cfe-commits, andreybokhanko, Hahnfeld, arpith-jacob, carlo.bertolli, mehdi_amini, caomhin Differential Revision: https://reviews.llvm.org/D21851 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279634 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- test/Driver/clang-offload-bundler.c 35 additions, 0 deletionstest/Driver/clang-offload-bundler.c
- test/Driver/clang-offload-bundler.c.o 0 additions, 0 deletionstest/Driver/clang-offload-bundler.c.o
- tools/clang-offload-bundler/ClangOffloadBundler.cpp 296 additions, 7 deletionstools/clang-offload-bundler/ClangOffloadBundler.cpp
test/Driver/clang-offload-bundler.c.o
0 → 100644
File added
Please register or sign in to comment