|
1 | 1 | // REQUIRES: x86-registered-target, amdgpu-registered-target
|
2 | 2 |
|
3 |
| -// RUN: touch %T/libhipBundled.a |
4 | 3 |
|
5 | 4 | // Check clang unbundle the archive and link them by lld.
|
6 | 5 |
|
| 6 | +// RUN: touch %T/libhipBundled.a |
7 | 7 | // RUN: %clang -### --offload-arch=gfx906 --offload-arch=gfx1030 \
|
| 8 | +// RUN: -target x86_64-unknown-linux-gnu \ |
8 | 9 | // RUN: -nogpulib %s -fgpu-rdc -L%T -lhipBundled \
|
9 |
| -// RUN: 2>&1 | FileCheck -check-prefix=CHECK %s |
| 10 | +// RUN: 2>&1 | FileCheck -check-prefix=GNU %s |
| 11 | + |
| 12 | +// RUN: touch %T/hipBundled2.lib |
| 13 | +// RUN: %clang -### --offload-arch=gfx906 --offload-arch=gfx1030 \ |
| 14 | +// RUN: -target x86_64-pc-windows-msvc \ |
| 15 | +// RUN: -nogpulib %s -fgpu-rdc -L%T -lhipBundled2 \ |
| 16 | +// RUN: 2>&1 | FileCheck -check-prefix=MSVC %s |
| 17 | + |
| 18 | +// GNU: "{{.*}}clang-offload-bundler" "-unbundle" "-type=a" "-input={{.*}}libhipBundled.a" "-targets=hip-amdgcn-amd-amdhsa-gfx1030" "-output=[[A1030:.*\.a]]" "-allow-missing-bundles" |
| 19 | +// GNU: "{{.*}}lld{{.*}}" {{.*}}"-plugin-opt=mcpu=gfx1030" {{.*}} "[[A1030]]" |
| 20 | +// GNU: "{{.*}}clang-offload-bundler" "-unbundle" "-type=a" "-input={{.*}}libhipBundled.a" "-targets=hip-amdgcn-amd-amdhsa-gfx906" "-output=[[A906:.*\.a]]" "-allow-missing-bundles" |
| 21 | +// GNU: "{{.*}}lld{{.*}}" {{.*}}"-plugin-opt=mcpu=gfx906" {{.*}} "[[A906]]" |
| 22 | +// GNU: "{{.*}}ld{{.*}}" {{.*}}"-o" "a.out" {{.*}}"-lhipBundled" |
10 | 23 |
|
11 |
| -// CHECK: "{{.*}}clang-offload-bundler" "-unbundle" "-type=a" "-input={{.*}}libhipBundled.a" "-targets=hip-amdgcn-amd-amdhsa-gfx1030" "-output=[[A1030:.*\.a]]" "-allow-missing-bundles" |
12 |
| -// CHECK: "{{.*}}lld{{.*}}" {{.*}}"-plugin-opt=mcpu=gfx1030" {{.*}} "[[A1030]]" |
13 |
| -// CHECK: "{{.*}}clang-offload-bundler" "-unbundle" "-type=a" "-input={{.*}}libhipBundled.a" "-targets=hip-amdgcn-amd-amdhsa-gfx906" "-output=[[A906:.*\.a]]" "-allow-missing-bundles" |
14 |
| -// CHECK: "{{.*}}lld{{.*}}" {{.*}}"-plugin-opt=mcpu=gfx906" {{.*}} "[[A906]]" |
| 24 | +// MSVC: "{{.*}}clang-offload-bundler" "-unbundle" "-type=a" "-input={{.*}}hipBundled2.lib" "-targets=hip-amdgcn-amd-amdhsa-gfx1030" "-output=[[A1030:.*\.a]]" "-allow-missing-bundles" |
| 25 | +// MSVC: "{{.*}}lld{{.*}}" {{.*}}"-plugin-opt=mcpu=gfx1030" {{.*}} "[[A1030]]" |
| 26 | +// MSVC: "{{.*}}clang-offload-bundler" "-unbundle" "-type=a" "-input={{.*}}hipBundled2.lib" "-targets=hip-amdgcn-amd-amdhsa-gfx906" "-output=[[A906:.*\.a]]" "-allow-missing-bundles" |
| 27 | +// MSVC: "{{.*}}lld{{.*}}" {{.*}}"-plugin-opt=mcpu=gfx906" {{.*}} "[[A906]]" |
| 28 | +// MSVC: "{{.*}}link{{.*}}" {{.*}}"-out:a.exe" {{.*}}"hipBundled2.lib" |
0 commit comments