[CUDA] Add option to generate relocatable device code
authorJonas Hahnfeld <hahnjo@hahnjo.de>
Mon, 12 Feb 2018 10:46:45 +0000 (10:46 +0000)
committerJonas Hahnfeld <hahnjo@hahnjo.de>
Mon, 12 Feb 2018 10:46:45 +0000 (10:46 +0000)
commit5379c6d6fd121f822b6b191906fc1aa664726607
tree08739fa004f397650e2264ac86c90de555bc2201
parent15dd8c6c32d84bd3251a63ba15c3d4cc305563c5
[CUDA] Add option to generate relocatable device code

As a first step, pass '-c/--compile-only' to ptxas so that it
doesn't complain about references to external function. This
will successfully generate object files, but they won't work
at runtime because the registration routines need to adapted.

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

llvm-svn: 324878
clang/include/clang/Basic/LangOptions.def
clang/include/clang/Driver/Options.td
clang/lib/Driver/ToolChains/Clang.cpp
clang/lib/Driver/ToolChains/Cuda.cpp
clang/lib/Frontend/CompilerInvocation.cpp
clang/test/Driver/cuda-external-tools.cu