[CUDA] Add driver support for compiling CUDA with the new driver
authorJoseph Huber <jhuber6@vols.utk.edu>
Mon, 21 Feb 2022 15:08:26 +0000 (10:08 -0500)
committerJoseph Huber <jhuber6@vols.utk.edu>
Fri, 29 Apr 2022 13:14:44 +0000 (09:14 -0400)
commitc5e5b54350fecd4b44c60eb4e982c13de5307aee
treecd7721b0e76e20214cf8614e66b5efc6f57ca544
parent4e2b5a6693e299fcb8671d4dbb69c993d181b29f
[CUDA] Add driver support for compiling CUDA with the new driver

This patch adds the basic support for the clang driver to compile and link CUDA
using the new offloading driver. This requires handling the CUDA offloading kind
and embedding the generated files into the host. This will allow us to link
OpenMP code with CUDA code in the linker wrapper. More support will be required
to create functional CUDA / HIP binaries using this method.

Depends on D120270 D120271 D120934

Reviewed By: tra

Differential Revision: https://reviews.llvm.org/D120272
clang/include/clang/Basic/Cuda.h
clang/include/clang/Basic/DiagnosticDriverKinds.td
clang/lib/Driver/Driver.cpp
clang/lib/Driver/ToolChains/Clang.cpp
clang/test/Driver/cuda-openmp-driver.cu [new file with mode: 0644]
clang/test/Driver/cuda-phases.cu