|
413 | 413 | // bundle and archives them. Therefore for each target, the output is an |
414 | 414 | // archive of unbundled bitcodes. |
415 | 415 | // |
416 | | -// RUN: mkdir -p %t.dir |
417 | 416 | // RUN: clang-offload-bundler -type=bc -targets=hip-amdgcn-amd-amdhsa--gfx900,hip-amdgcn-amd-amdhsa--gfx906 \ |
418 | | -// RUN: -input=%t.tgt1 -input=%t.tgt2 -output=%t.dir/hip_bundle1.bc |
| 417 | +// RUN: -input=%t.tgt1 -input=%t.tgt2 -output=%T/hip_bundle1.bc |
419 | 418 | // RUN: clang-offload-bundler -type=bc -targets=hip-amdgcn-amd-amdhsa--gfx900,hip-amdgcn-amd-amdhsa--gfx906 \ |
420 | | -// RUN: -input=%t.tgt1 -input=%t.tgt2 -output=%t.dir/hip_bundle2.bc |
421 | | -// RUN: llvm-ar cr %t.dir/hip_archive.a %t.dir/hip_bundle1.bc %t.dir/hip_bundle2.bc |
| 419 | +// RUN: -input=%t.tgt1 -input=%t.tgt2 -output=%T/hip_bundle2.bc |
| 420 | +// RUN: llvm-ar cr %T/hip_archive.a %T/hip_bundle1.bc %T/hip_bundle2.bc |
422 | 421 | // RUN: clang-offload-bundler -unbundle -type=a -targets=hip-amdgcn-amd-amdhsa--gfx900,hip-amdgcn-amd-amdhsa--gfx906 \ |
423 | | -// RUN: -output=%t.dir/hip_900.a -output=%t.dir/hip_906.a -input=%t.dir/hip_archive.a |
424 | | -// RUN: llvm-ar t %t.dir/hip_900.a | FileCheck -check-prefix=HIP-AR-900 %s |
425 | | -// RUN: llvm-ar t %t.dir/hip_906.a | FileCheck -check-prefix=HIP-AR-906 %s |
| 422 | +// RUN: -output=%T/hip_900.a -output=%T/hip_906.a -input=%T/hip_archive.a |
| 423 | +// RUN: llvm-ar t %T/hip_900.a | FileCheck -check-prefix=HIP-AR-900 %s |
| 424 | +// RUN: llvm-ar t %T/hip_906.a | FileCheck -check-prefix=HIP-AR-906 %s |
426 | 425 | // HIP-AR-900-DAG: hip_bundle1-hip-amdgcn-amd-amdhsa--gfx900 |
427 | 426 | // HIP-AR-900-DAG: hip_bundle2-hip-amdgcn-amd-amdhsa--gfx900 |
428 | 427 | // HIP-AR-906-DAG: hip_bundle1-hip-amdgcn-amd-amdhsa--gfx906 |
|
554 | 553 |
|
555 | 554 | // Check compatibility of HIP code objects found in the heterogeneous archive library with OpenMP code objects of the target |
556 | 555 | // RUN: clang-offload-bundler -unbundle -type=a -targets=openmp-amdgcn-amd-amdhsa--gfx906 \ |
557 | | -// RUN: -output=%t.dir/hip-openmp_906.a -input=%t.dir/hip_archive.a -hip-openmp-compatible |
558 | | -// RUN: llvm-ar t %t.dir/hip-openmp_906.a | FileCheck -check-prefix=OPENMPHIPCOMPAT %s |
| 556 | +// RUN: -output=%T/hip-openmp_906.a -input=%T/hip_archive.a -hip-openmp-compatible |
| 557 | +// RUN: llvm-ar t %T/hip-openmp_906.a | FileCheck -check-prefix=OPENMPHIPCOMPAT %s |
559 | 558 | // OPENMPHIPCOMPAT: hip_bundle1-hip-amdgcn-amd-amdhsa--gfx906 |
560 | 559 |
|
561 | 560 | // Check if a malformat bundle id can be detected and an error can be emitted. |
562 | | -// RUN: not clang-offload-bundler -unbundle -type=a -targets=openmp-amdgcn-amd-amdhsa -output=%t.dir/hip-openmp_906.a -input=%t.dir/hip_archive.a -hip-openmp-compatible 2>&1 | FileCheck %s -check-prefix=ERROR-WRONG-FORMAT |
| 561 | +// RUN: not clang-offload-bundler -unbundle -type=a -targets=openmp-amdgcn-amd-amdhsa -output=%T/hip-openmp_906.a -input=%T/hip_archive.a -hip-openmp-compatible 2>&1 | FileCheck %s -check-prefix=ERROR-WRONG-FORMAT |
563 | 562 | // ERROR-WRONG-FORMAT: error: Targets need to follow the format '<offload kind>-<target triple>', where '<target triple>' follows the format '<kind>-<arch>-<vendor>-<os>-<env>[-<target id>[:target features]]'. |
564 | | -// RUN: not clang-offload-bundler -unbundle -type=a -targets=openmp-amdgcn-amd-amdhsa-gfx906 -output=%t.dir/hip-openmp_906.a -input=%t.dir/hip_archive.a -hip-openmp-compatible 2>&1 | FileCheck %s -check-prefix=ERROR-NO-ENV |
| 563 | +// RUN: not clang-offload-bundler -unbundle -type=a -targets=openmp-amdgcn-amd-amdhsa-gfx906 -output=%T/hip-openmp_906.a -input=%T/hip_archive.a -hip-openmp-compatible 2>&1 | FileCheck %s -check-prefix=ERROR-NO-ENV |
565 | 564 | // ERROR-NO-ENV: error: no compatible code object found for the target 'openmp-amdgcn-amd-amdhsa--' |
566 | 565 |
|
567 | 566 | // Some code so that we can create a binary out of this file. |
|
0 commit comments