|
| 1 | +// REQUIRES: clang-driver, amdgpu-registered-target |
| 2 | + |
| 3 | +// RUN: %clang -### -target x86_64-unknown-linux-gnu \ |
| 4 | +// RUN: --offload-arch=gfx803 -nogpulib \ |
| 5 | +// RUN: -x hip-cpp-output %s 2>&1 | FileCheck %s |
| 6 | + |
| 7 | +// CHECK: {{".*clang-offload-bundler.*"}} {{.*}}"-outputs=[[HOST_PP:.*cui]],[[DEV_PP:.*cui]]" "-unbundle" |
| 8 | +// CHECK: {{".*clang.*"}} "-cc1" {{.*}}"-target-cpu" "gfx803" {{.*}}"-o" "[[DEV_O:.*o]]" {{.*}}"[[DEV_PP]]" |
| 9 | +// CHECK: {{".*lld.*"}} {{.*}}"-o" "[[DEV_ISA:.*]]" "[[DEV_O]]" |
| 10 | +// CHECK: {{".*clang-offload-bundler.*"}} {{.*}}"-inputs={{.*}},[[DEV_ISA]]" "-outputs=[[FATBIN:.*]]" |
| 11 | +// CHECK: {{".*clang.*"}} {{.*}}"-triple" "x86_64-unknown-linux-gnu"{{.*}} "-fcuda-include-gpubinary" "[[FATBIN]]" {{.*}}"-o" "[[HOST_O:.*o]]" {{.*}}"[[HOST_PP]]" |
| 12 | +// CHECK: {{".*ld.*"}} {{.*}}"[[HOST_O]]" |
| 13 | + |
| 14 | +// RUN: %clang -### -target x86_64-unknown-linux-gnu \ |
| 15 | +// RUN: --offload-arch=gfx803 -nogpulib -fgpu-rdc \ |
| 16 | +// RUN: -x hip-cpp-output %s 2>&1 | FileCheck -check-prefix=RDC %s |
| 17 | + |
| 18 | +// RDC: {{".*clang-offload-bundler.*"}} {{.*}}"-outputs=[[HOST_PP:.*cui]],[[DEV_PP:.*cui]]" "-unbundle" |
| 19 | +// RDC: {{".*clang.*"}} {{.*}}"-triple" "x86_64-unknown-linux-gnu"{{.*}} "-o" "[[HOST_O:.*o]]" {{.*}}"[[HOST_PP]]" |
| 20 | +// RDC: {{".*clang-offload-bundler.*"}} {{.*}}"-outputs=[[HOST_PP:.*cui]],[[DEV_PP:.*cui]]" "-unbundle" |
| 21 | +// RDC: {{".*clang.*"}} "-cc1" {{.*}}"-target-cpu" "gfx803" {{.*}}"-o" "[[DEV_BC:.*bc]]" {{.*}}"[[DEV_PP]]" |
| 22 | +// RDC: {{".*lld.*"}} {{.*}}"-o" "[[DEV_ISA:.*]]" "[[DEV_BC]]" |
| 23 | +// RDC: {{".*clang-offload-bundler.*"}} {{.*}}"-inputs={{.*}},[[DEV_ISA]]" "-outputs=[[FATBIN:.*]]" |
| 24 | +// RDC: {{".*llvm-mc.*"}} "-o" "[[FATBIN_O:.*o]]" |
| 25 | +// RDC: {{".*ld.*"}} {{.*}}"[[HOST_O]]" "[[FATBIN_O]]" |
0 commit comments