1 | // REQUIRES: clang-driver |
2 | // REQUIRES: x86-registered-target |
3 | // REQUIRES: amdgpu-registered-target |
4 | |
5 | // RUN: touch %t.o |
6 | // RUN: %clang --hip-link -ccc-print-bindings -target x86_64-linux-gnu \ |
7 | // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 -fgpu-rdc %t.o\ |
8 | // RUN: 2>&1 | FileCheck %s |
9 | |
10 | // CHECK: # "amdgcn-amd-amdhsa" - "offload bundler", inputs: ["[[IN:.*o]]"], outputs: ["[[OBJ1:.*o]]", "[[OBJ2:.*o]]", "[[OBJ3:.*o]]"] |
11 | // CHECK: # "amdgcn-amd-amdhsa" - "AMDGCN::Linker", inputs: ["[[OBJ2]]"], output: "[[IMG2:.*out]]" |
12 | // CHECK-NOT: offload bundler |
13 | // CHECK: # "amdgcn-amd-amdhsa" - "AMDGCN::Linker", inputs: ["[[OBJ3]]"], output: "[[IMG3:.*out]]" |
14 | // CHECK-NOT: offload bundler |
15 | // CHECK: # "x86_64-unknown-linux-gnu" - "GNU::Linker", inputs: ["[[OBJ1]]", "[[IMG2]]", "[[IMG3]]"], output: "a.out" |
16 | |
17 | // RUN: %clang --hip-link -ccc-print-bindings -target x86_64-linux-gnu \ |
18 | // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %t.o\ |
19 | // RUN: 2>&1 | FileCheck -check-prefix=NORDC %s |
20 | |
21 | // NORDC-NOT: offload bundler |
22 | // NORDC: # "x86_64-unknown-linux-gnu" - "GNU::Linker", inputs: ["{{.*o}}"], output: "a.out" |
23 | |