summaryrefslogtreecommitdiff
path: root/test/Driver/hip-link-shared-library.hip
diff options
context:
space:
mode:
authorAaron Enye Shi <enye.shi@gmail.com>2019-01-04 19:05:41 +0000
committerAaron Enye Shi <enye.shi@gmail.com>2019-01-04 19:05:41 +0000
commit5aa017b125e501db919c6c62be03f0a275ebc63f (patch)
tree0836692c00228bcf5f0c7b816469b4e8fd27db37 /test/Driver/hip-link-shared-library.hip
parent1229779346fd2c2b340ab4db245bb67224c5d97b (diff)
downloadclang-5aa017b125e501db919c6c62be03f0a275ebc63f.tar.gz
[HIP][DRIVER][OFFLOAD] Do not unbundle unsupported file types
The offload bundler action should not unbundle the input file types that does not match the action type. This fixes an issue where .so files are unbundled when the action type is object files. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350425 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Driver/hip-link-shared-library.hip')
-rw-r--r--test/Driver/hip-link-shared-library.hip11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/Driver/hip-link-shared-library.hip b/test/Driver/hip-link-shared-library.hip
new file mode 100644
index 0000000000..2e36dff369
--- /dev/null
+++ b/test/Driver/hip-link-shared-library.hip
@@ -0,0 +1,11 @@
+// RUN: touch %t.o
+// RUN: %clang --hip-link -ccc-print-bindings -target x86_64-linux-gnu \
+// RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %t.o %S/Inputs/in.so \
+// RUN: 2>&1 | FileCheck %s
+
+// CHECK: # "amdgcn-amd-amdhsa" - "offload bundler", inputs: ["[[IN:.*o]]"], outputs: ["[[OBJ1:.*o]]", "[[OBJ2:.*o]]", "[[OBJ3:.*o]]"]
+// CHECK: # "amdgcn-amd-amdhsa" - "AMDGCN::Linker", inputs: ["[[OBJ2]]"], output: "[[IMG2:.*out]]"
+// CHECK-NOT: offload bundler
+// CHECK: # "amdgcn-amd-amdhsa" - "AMDGCN::Linker", inputs: ["[[OBJ3]]"], output: "[[IMG3:.*out]]"
+// CHECK-NOT: offload bundler
+// CHECK: # "x86_64-unknown-linux-gnu" - "GNU::Linker", inputs: ["[[OBJ1]]", "{{.*}}/Inputs/in.so", "[[IMG2]]", "[[IMG3]]"], output: "a.out"