[CUDA][HIP] Add -Xarch_device and -Xarch_host options
authorYaxun (Sam) Liu <yaxun.liu@amd.com>
Mon, 23 Mar 2020 18:23:09 +0000 (14:23 -0400)
committerYaxun (Sam) Liu <yaxun.liu@amd.com>
Tue, 24 Mar 2020 14:13:05 +0000 (10:13 -0400)
commit2ae25647d1a363515ecbd193dc66d8ada80dd054
tree08207f801b8741be88c05b4981bcf895af7ca8a9
parentd381b6a8d3e87d65f4ae9ca4d4333203e01825f5
[CUDA][HIP] Add -Xarch_device and -Xarch_host options

The argument after -Xarch_device will be added to the arguments for CUDA/HIP
device compilation and will be removed for host compilation.

The argument after -Xarch_host will be added to the arguments for CUDA/HIP
host compilation and will be removed for device compilation.

Differential Revision: https://reviews.llvm.org/D76520
clang/include/clang/Driver/Options.td
clang/include/clang/Driver/ToolChain.h
clang/lib/Driver/Compilation.cpp
clang/lib/Driver/ToolChain.cpp
clang/lib/Driver/ToolChains/Cuda.cpp
clang/lib/Driver/ToolChains/HIP.cpp
clang/test/Driver/hip-options.hip