1 // RUN: %clang -### --target=x86_64-linux-gnu \
2 // RUN: --offload-arch=gfx803 --offload-arch=gfx900 \
3 // RUN: --cuda-device-only -nogpuinc -nogpulib -c \
4 // RUN: %s 2>&1 | FileCheck %s
8 // CHECK: [[CLANG:".*clang.*"]] "-cc1"{{.*}} "-triple" "amdgcn-amd-amdhsa"
9 // CHECK-SAME: "-fcuda-is-device"
10 // CHECK-SAME: "-target-cpu" "gfx803"
11 // CHECK-SAME: {{.*}} "-o" [[OBJ_DEV_A_803:".*o"]] "-x" "hip"
13 // CHECK: [[LLD: ".*lld.*"]] "-flavor" "gnu" "-m" "elf64_amdgpu" "--no-undefined" "-shared"
14 // CHECK-SAME: "-o" "[[IMG_DEV_A_803:.*out]]" [[OBJ_DEV_A_803]]
16 // CHECK: [[CLANG:".*clang.*"]] "-cc1"{{.*}} "-triple" "amdgcn-amd-amdhsa"
17 // CHECK-SAME: "-emit-obj"
18 // CHECK-SAME: "-fcuda-is-device"
19 // CHECK-SAME: "-target-cpu" "gfx900"
20 // CHECK-SAME: {{.*}} "-o" [[OBJ_DEV_A_900:".*o"]] "-x" "hip"
22 // CHECK: [[LLD]] "-flavor" "gnu" "-m" "elf64_amdgpu" "--no-undefined" "-shared"
23 // CHECK-SAME: "-o" "[[IMG_DEV_A_900:.*out]]" [[OBJ_DEV_A_900]]
25 // CHECK: [[BUNDLER:".*clang-offload-bundler"]] "-type=o"
26 // CHECK-SAME: "-targets={{.*}},hip{{.*}}-amdgcn-amd-amdhsa--gfx803,hip{{.*}}-amdgcn-amd-amdhsa--gfx900"
27 // CHECK-SAME: "-input={{.*}}" "-input=[[IMG_DEV_A_803]]" "-input=[[IMG_DEV_A_900]]" "-output=[[BUNDLE_A:.*hipfb]]"