[Driver] Add CUDA support for --offload param
authorDaniele Castagna <dcastagna@chromium.org>
Fri, 28 Jan 2022 22:49:48 +0000 (14:49 -0800)
committerJustin Lebar <justin.lebar@gmail.com>
Fri, 28 Jan 2022 22:50:39 +0000 (14:50 -0800)
commit6eb826567af03c2b43cda78836b1065e12df84e4
tree40aacfde73b6a94dfa23ce9b3a76a34151f810e8
parent99d2582164c4bc8f10c3e3c20dd3690243ad49ba
[Driver] Add CUDA support for --offload param

The --offload option was added in D110622 to "override the default
device target". When it landed it supported only HIP.  This patch
extends that option to support SPIR-V targets for CUDA.

Reviewed By: tra

Differential Revision: https://reviews.llvm.org/D117137
clang/include/clang/Basic/DiagnosticDriverKinds.td
clang/include/clang/Driver/Options.td
clang/lib/Driver/Driver.cpp
clang/test/Driver/cuda-device-triple.cu [new file with mode: 0644]
clang/test/Driver/invalid-offload-options.cpp