22 lines · c
1// REQUIRES: x86-registered-target2// UNSUPPORTED: target={{.*-windows.*}}, target={{.*}}-macosx{{.*}}, target={{.*-darwin.*}}, target={{.*}}-aix{{.*}}, target={{.*}}-zos{{.*}}3 4// Generate dummy fat object5// RUN: %clang -O0 --target=%itanium_abi_triple %s -c -o %t.host.o6// RUN: echo 'Content of device file' > %t.tgt.o7// RUN: clang-offload-bundler -type=o -targets=host-%itanium_abi_triple,openmp-%itanium_abi_triple -input=%t.host.o -input=%t.tgt.o -output=%t.fat.obj8 9// Then create a static archive with that object10// RUN: rm -f %t.fat.a11// RUN: llvm-ar cr %t.fat.a %t.fat.obj12 13// Unbundle device part from the archive. Check that bundler does not print warnings.14// RUN: clang-offload-bundler -unbundle -type=a -targets=openmp-%itanium_abi_triple -input=%t.fat.a -output=%t.tgt.a 2>&1 | FileCheck --allow-empty --check-prefix=CHECK-WARNING %s15// CHECK-WARNING-NOT: warning16 17// Check that device archive member inherited file extension from the original file.18// RUN: llvm-ar t %t.tgt.a | FileCheck --check-prefix=CHECK-ARCHIVE %s19// CHECK-ARCHIVE: {{\.obj$}}20 21void foo(void) {}22