diff options
author | Sergey Dmitriev <serguei.n.dmitriev@intel.com> | 2019-10-09 20:42:58 +0000 |
---|---|---|
committer | Sergey Dmitriev <serguei.n.dmitriev@intel.com> | 2019-10-09 20:42:58 +0000 |
commit | a0d83768f10849e5cf230391fac949dc5118c0a6 (patch) | |
tree | 8a882a19d1a47f42867913b64e648740579d0669 /clang/lib/Driver/ToolChains/Gnu.cpp | |
parent | 868b47fcbef1a116adf6668f24c2c3fcbfd57701 (diff) | |
download | bcm5719-llvm-a0d83768f10849e5cf230391fac949dc5118c0a6.tar.gz bcm5719-llvm-a0d83768f10849e5cf230391fac949dc5118c0a6.zip |
[Clang][OpenMP Offload] Add new tool for wrapping offload device binaries
This patch removes the remaining part of the OpenMP offload linker scripts which was used for inserting device binaries into the output linked binary. Device binaries are now inserted into the host binary with a help of the wrapper bit-code file which contains device binaries as data. Wrapper bit-code file is dynamically created by the clang driver with a help of new tool clang-offload-wrapper which takes device binaries as input and produces bit-code file with required contents. Wrapper bit-code is then compiled to an object and resulting object is appended to the host linking by the clang driver.
This is the second part of the patch for eliminating OpenMP linker script (please see https://reviews.llvm.org/D64943).
Differential Revision: https://reviews.llvm.org/D68166
llvm-svn: 374219
Diffstat (limited to 'clang/lib/Driver/ToolChains/Gnu.cpp')
-rw-r--r-- | clang/lib/Driver/ToolChains/Gnu.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp index c7abe5c69a1..c302a31cd2e 100644 --- a/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/clang/lib/Driver/ToolChains/Gnu.cpp @@ -499,7 +499,7 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA, P = ToolChain.GetFilePath(crtbegin); } CmdArgs.push_back(Args.MakeArgString(P)); - } + } // Add crtfastmath.o if available and fast math is enabled. ToolChain.AddFastMathRuntimeIfAvailable(Args, CmdArgs); @@ -623,9 +623,6 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA, } } - // Add OpenMP offloading linker script args if required. - AddOpenMPLinkerScript(getToolChain(), C, Output, Inputs, Args, CmdArgs, JA); - // Add HIP offloading linker script args if required. AddHIPLinkerScript(getToolChain(), C, Output, Inputs, Args, CmdArgs, JA, *this); |