Skip to content

Commit ed7cee9

Browse files
authored
[Driver] Test ignored target-specific options for AMDGPU/NVPTX (#79222)
Fix missing test coverage after #70740 #70760 When compiling for CUDA/HIP, the driver creates a cc1 job to compile for amdgcn/nvptx triple using most options. Certain target-specific options should be ignored, not lead to an error (`err_drv_unsupported_opt_for_target`).
1 parent 604a6c4 commit ed7cee9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/// Some target-specific options are ignored for GPU, so %clang exits with code 0.
2+
// DEFINE: %{check} = %clang -### -c -mcmodel=medium
3+
4+
// RUN: %{check} -x cuda %s --cuda-path=%S/Inputs/CUDA/usr/local/cuda --offload-arch=sm_60 --no-cuda-version-check -fbasic-block-sections=all
5+
// RUN: %{check} -x hip %s --rocm-path=%S/Inputs/rocm -nogpulib -nogpuinc

0 commit comments

Comments
 (0)