| 1 |
// RUN: touch %t.o |
| 2 |
// RUN: %clang --hip-link -ccc-print-bindings --target=x86_64-linux-gnu \ |
| 3 |
// RUN: --no-offload-new-driver --emit-static-lib \ |
| 4 |
// RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 -fgpu-rdc %t.o\ |
| 5 |
// RUN: 2>&1 | FileCheck %s |
| 6 |
|
| 7 |
// CHECK: # "x86_64-unknown-linux-gnu" - "offload bundler", inputs: ["[[IN:.*o]]"], outputs: ["[[HOSTOBJ:.*o]]", "{{.*o}}", "{{.*o}}"] |
| 8 |
// CHECK: # "amdgcn-amd-amdhsa" - "offload bundler", inputs: ["[[IN]]"], outputs: ["{{.*o}}", "[[DOBJ1:.*o]]", "[[DOBJ2:.*o]]"] |
| 9 |
// CHECK: # "amdgcn-amd-amdhsa" - "AMDGCN::Linker", inputs: ["[[DOBJ1]]"], output: "[[IMG1:.*out]]" |
| 10 |
// CHECK-NOT: offload bundler |
| 11 |
// CHECK: # "amdgcn-amd-amdhsa" - "AMDGCN::Linker", inputs: ["[[DOBJ2]]"], output: "[[IMG2:.*out]]" |
| 12 |
// CHECK-NOT: offload bundler |
| 13 |
// CHECK: # "amdgcn-amd-amdhsa" - "AMDGCN::Linker", inputs: ["[[IMG1]]", "[[IMG2]]"], output: "[[FATBINOBJ:.*o]]" |
| 14 |
// CHECK-NOT: offload bundler |
| 15 |
// CHECK: # "x86_64-unknown-linux-gnu" - "GNU::StaticLibTool", inputs: ["[[HOSTOBJ]]", "[[FATBINOBJ]]"], output: "a.out" |
| 16 |
|
| 17 |
// RUN: %clang --hip-link -ccc-print-bindings --target=x86_64-linux-gnu \ |
| 18 |
// RUN: --no-offload-new-driver --emit-static-lib \ |
| 19 |
// RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %t.o\ |
| 20 |
// RUN: 2>&1 | FileCheck -check-prefix=NORDC %s |
| 21 |
|
| 22 |
// NORDC-NOT: offload bundler |
| 23 |
// NORDC: # "x86_64-unknown-linux-gnu" - "GNU::StaticLibTool", inputs: ["{{.*o}}"], output: "a.out" |
| 24 |
|
| 25 |
// RUN: %clang --hip-link -### --target=x86_64-linux-gnu \ |
| 26 |
// RUN: --no-offload-new-driver --emit-static-lib -lgcc \ |
| 27 |
// RUN: -Wl,--enable-new-dtags -Wl,--rpath=/opt \ |
| 28 |
// RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 -fgpu-rdc %t.o\ |
| 29 |
// RUN: 2>&1 | FileCheck -check-prefix=NOFLAG %s |
| 30 |
|
| 31 |
// NOFLAG-NOT: .*lgcc |
| 32 |
// NOFLAG-NOT: .*enable-new-dtags |
| 33 |
// NOFLAG-NOT: .*rpath=/opt |
| 34 |
// NOFLAG: "{{.*}}llvm-ar{{.*}}" "rcsD" "{{.*}}.out" "{{.*o}}" "{{.*o}}" |