[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / test / Driver / hip-toolchain-device-only.hip
blob21fc865c3e7c08d0e7799fc24498cc26e1c55fb6
1 // REQUIRES: amdgpu-registered-target
3 // RUN: %clang -### -target x86_64-linux-gnu \
4 // RUN:   --offload-arch=gfx803 --offload-arch=gfx900 \
5 // RUN:   --cuda-device-only -nogpuinc -nogpulib -c \
6 // RUN:   %s 2>&1 | FileCheck %s
8 // CHECK-NOT: error:
10 // CHECK: [[CLANG:".*clang.*"]] "-cc1"{{.*}} "-triple" "amdgcn-amd-amdhsa"
11 // CHECK-SAME: "-fcuda-is-device"
12 // CHECK-SAME: "-target-cpu" "gfx803"
13 // CHECK-SAME: {{.*}} "-o" [[OBJ_DEV_A_803:".*o"]] "-x" "hip"
15 // CHECK: [[LLD: ".*lld.*"]] "-flavor" "gnu" "--no-undefined" "-shared"
16 // CHECK-SAME: "-o" "[[IMG_DEV_A_803:.*out]]" [[OBJ_DEV_A_803]]
18 // CHECK: [[CLANG:".*clang.*"]] "-cc1"{{.*}} "-triple" "amdgcn-amd-amdhsa"
19 // CHECK-SAME: "-emit-obj"
20 // CHECK-SAME: "-fcuda-is-device"
21 // CHECK-SAME: "-target-cpu" "gfx900"
22 // CHECK-SAME: {{.*}} "-o" [[OBJ_DEV_A_900:".*o"]] "-x" "hip"
24 // CHECK: [[LLD]] "-flavor" "gnu" "--no-undefined" "-shared"
25 // CHECK-SAME: "-o" "[[IMG_DEV_A_900:.*out]]" [[OBJ_DEV_A_900]]
27 // CHECK: [[BUNDLER:".*clang-offload-bundler"]] "-type=o"
28 // CHECK-SAME: "-targets={{.*}},hip{{.*}}-amdgcn-amd-amdhsa--gfx803,hip{{.*}}-amdgcn-amd-amdhsa--gfx900"
29 // CHECK-SAME: "-input={{.*}}" "-input=[[IMG_DEV_A_803]]" "-input=[[IMG_DEV_A_900]]" "-output=[[BUNDLE_A:.*hipfb]]"