|
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 |
416 | 417 | // RUN: clang-offload-bundler -type=bc -targets=hip-amdgcn-amd-amdhsa--gfx900,hip-amdgcn-amd-amdhsa--gfx906 \
|
417 |
| -// RUN: -input=%t.tgt1 -input=%t.tgt2 -output=%T/hip_bundle1.bc |
| 418 | +// RUN: -input=%t.tgt1 -input=%t.tgt2 -output=%t.dir/hip_bundle1.bc |
418 | 419 | // RUN: clang-offload-bundler -type=bc -targets=hip-amdgcn-amd-amdhsa--gfx900,hip-amdgcn-amd-amdhsa--gfx906 \
|
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 |
| 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 |
421 | 422 | // RUN: clang-offload-bundler -unbundle -type=a -targets=hip-amdgcn-amd-amdhsa--gfx900,hip-amdgcn-amd-amdhsa--gfx906 \
|
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 |
| 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 |
425 | 426 | // HIP-AR-900-DAG: hip_bundle1-hip-amdgcn-amd-amdhsa--gfx900
|
426 | 427 | // HIP-AR-900-DAG: hip_bundle2-hip-amdgcn-amd-amdhsa--gfx900
|
427 | 428 | // HIP-AR-906-DAG: hip_bundle1-hip-amdgcn-amd-amdhsa--gfx906
|
|
553 | 554 |
|
554 | 555 | // Check compatibility of HIP code objects found in the heterogeneous archive library with OpenMP code objects of the target
|
555 | 556 | // RUN: clang-offload-bundler -unbundle -type=a -targets=openmp-amdgcn-amd-amdhsa--gfx906 \
|
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 |
| 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 |
558 | 559 | // OPENMPHIPCOMPAT: hip_bundle1-hip-amdgcn-amd-amdhsa--gfx906
|
559 | 560 |
|
560 | 561 | // Check if a malformat bundle id can be detected and an error can be emitted.
|
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 |
| 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 |
562 | 563 | // 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]]'.
|
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 |
| 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 |
564 | 565 | // ERROR-NO-ENV: error: no compatible code object found for the target 'openmp-amdgcn-amd-amdhsa--'
|
565 | 566 |
|
566 | 567 | // Some code so that we can create a binary out of this file.
|
|
0 commit comments