diff options
author | Artem Belevich <tra@google.com> | 2015-09-10 18:24:23 +0000 |
---|---|---|
committer | Artem Belevich <tra@google.com> | 2015-09-10 18:24:23 +0000 |
commit | 7cb25c9b69c9095ea268b13c4b75d92e3f2ac3e9 (patch) | |
tree | a673f37406032a92c70b87378a9ed24350c149e7 /clang/lib/CodeGen/CodeGenAction.cpp | |
parent | 7ad7ae1fac53b9f5743eb55808a0d39f63295dff (diff) | |
download | llvm-7cb25c9b69c9095ea268b13c4b75d92e3f2ac3e9.zip llvm-7cb25c9b69c9095ea268b13c4b75d92e3f2ac3e9.tar.gz llvm-7cb25c9b69c9095ea268b13c4b75d92e3f2ac3e9.tar.bz2 |
[CUDA] Postprocess bitcode linked in during device-side CUDA compilation.
Link in and internalize the symbols we need from supplied bitcode library.
Differential Revision: http://reviews.llvm.org/D11664
llvm-svn: 247317
Diffstat (limited to 'clang/lib/CodeGen/CodeGenAction.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenAction.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenAction.cpp b/clang/lib/CodeGen/CodeGenAction.cpp index 062c7be..b70a080 100644 --- a/clang/lib/CodeGen/CodeGenAction.cpp +++ b/clang/lib/CodeGen/CodeGenAction.cpp @@ -159,7 +159,12 @@ namespace clang { if (LinkModule) { if (Linker::LinkModules( M, LinkModule.get(), - [=](const DiagnosticInfo &DI) { linkerDiagnosticHandler(DI); })) + [=](const DiagnosticInfo &DI) { linkerDiagnosticHandler(DI); }, + (LangOpts.CUDA && LangOpts.CUDAIsDevice && + LangOpts.CUDAUsesLibDevice) + ? (Linker::Flags::LinkOnlyNeeded | + Linker::Flags::InternalizeLinkedSymbols) + : Linker::Flags::None)) return; } |