summaryrefslogtreecommitdiffstats
path: root/include/clang
diff options
context:
space:
mode:
authorYaxun Liu <Yaxun.Liu@amd.com>2018-05-11 19:21:39 +0000
committerYaxun Liu <Yaxun.Liu@amd.com>2018-05-11 19:21:39 +0000
commit6e79e3ea0e0d46dce51b57af77514060bb77c499 (patch)
treead0434b448a0817e9d5ae8c1369ea11620f13015 /include/clang
parentdaf5c0ea220f8bfd7d57193682172d11803d0f0c (diff)
[HIP] Set proper triple and offload kind for the toolchain
Also introduce --hip-link option to indicate HIP for linking. Differential Revision: https://reviews.llvm.org/D46475 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@332123 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang')
-rw-r--r--include/clang/Basic/DiagnosticDriverKinds.td1
-rw-r--r--include/clang/Driver/Options.td2
-rw-r--r--include/clang/Driver/Types.h3
3 files changed, 6 insertions, 0 deletions
diff --git a/include/clang/Basic/DiagnosticDriverKinds.td b/include/clang/Basic/DiagnosticDriverKinds.td
index 1b94b2dc9c..003450d951 100644
--- a/include/clang/Basic/DiagnosticDriverKinds.td
+++ b/include/clang/Basic/DiagnosticDriverKinds.td
@@ -41,6 +41,7 @@ def err_drv_cuda_version_unsupported : Error<
"install, pass a different GPU arch with --cuda-gpu-arch, or pass "
"--no-cuda-version-check.">;
def err_drv_cuda_host_arch : Error<"unsupported architecture '%0' for host compilation.">;
+def err_drv_mix_cuda_hip : Error<"Mixed Cuda and HIP compilation is not supported.">;
def err_drv_invalid_thread_model_for_target : Error<
"invalid thread model '%0' in '%1' for this target">;
def err_drv_invalid_linker_name : Error<
diff --git a/include/clang/Driver/Options.td b/include/clang/Driver/Options.td
index 8d03da31a3..0919f97665 100644
--- a/include/clang/Driver/Options.td
+++ b/include/clang/Driver/Options.td
@@ -557,6 +557,8 @@ def no_cuda_include_ptx_EQ : Joined<["--"], "no-cuda-include-ptx=">, Flags<[Driv
HelpText<"Do not include PTX for the follwing GPU architecture (e.g. sm_35) or 'all'. May be specified more than once.">;
def cuda_gpu_arch_EQ : Joined<["--"], "cuda-gpu-arch=">, Flags<[DriverOption]>,
HelpText<"CUDA GPU architecture (e.g. sm_35). May be specified more than once.">;
+def hip_link : Flag<["--"], "hip-link">,
+ HelpText<"Link clang-offload-bundler bundles for HIP">;
def no_cuda_gpu_arch_EQ : Joined<["--"], "no-cuda-gpu-arch=">, Flags<[DriverOption]>,
HelpText<"Remove GPU architecture (e.g. sm_35) from the list of GPUs to compile for. "
"'all' resets the list to its default value.">;
diff --git a/include/clang/Driver/Types.h b/include/clang/Driver/Types.h
index 22a26ae46a..5bc6668a0d 100644
--- a/include/clang/Driver/Types.h
+++ b/include/clang/Driver/Types.h
@@ -77,6 +77,9 @@ namespace types {
/// isCuda - Is this a CUDA input.
bool isCuda(ID Id);
+ /// isHIP - Is this a HIP input.
+ bool isHIP(ID Id);
+
/// isObjC - Is this an "ObjC" input (Obj-C and Obj-C++ sources and headers).
bool isObjC(ID Id);