summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCUDA/dependent-libs.cu
diff options
context:
space:
mode:
authorYaxun Liu <Yaxun.Liu@amd.com>2019-05-28 21:18:59 +0000
committerYaxun Liu <Yaxun.Liu@amd.com>2019-05-28 21:18:59 +0000
commit02afe4e077c480f839c891ea12c274fe2f63ca14 (patch)
tree028e48ae12caeba1765f981788f271896b44a835 /clang/test/CodeGenCUDA/dependent-libs.cu
parentfe23ed2c681413e7baf517c79aee9be130579873 (diff)
downloadbcm5719-llvm-02afe4e077c480f839c891ea12c274fe2f63ca14.tar.gz
bcm5719-llvm-02afe4e077c480f839c891ea12c274fe2f63ca14.zip
[CUDA][HIP] Emit dependent libs for host only
Recently D60274 was introduced to allow lld to handle dependent libs. However current usage of dependent libs (e.g. pragma comment(lib, *) in windows header files) are intended for host only. Emitting the metadata in device IR causes link error in device path. Until there is a way to different it dependent libs for device or host, metadata for dependent libs should be emitted for host only. This patch enforces that. Differential Revision: https://reviews.llvm.org/D62483 llvm-svn: 361880
Diffstat (limited to 'clang/test/CodeGenCUDA/dependent-libs.cu')
-rw-r--r--clang/test/CodeGenCUDA/dependent-libs.cu6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/CodeGenCUDA/dependent-libs.cu b/clang/test/CodeGenCUDA/dependent-libs.cu
new file mode 100644
index 00000000000..6f59e667d3b
--- /dev/null
+++ b/clang/test/CodeGenCUDA/dependent-libs.cu
@@ -0,0 +1,6 @@
+// RUN: %clang_cc1 -emit-llvm -o - -fcuda-is-device -x hip %s | FileCheck --check-prefix=DEV %s
+// RUN: %clang_cc1 -emit-llvm -o - -x hip %s | FileCheck --check-prefix=HOST %s
+
+// DEV-NOT: llvm.dependent-libraries
+// HOST: llvm.dependent-libraries
+#pragma comment(lib, "libabc")
OpenPOWER on IntegriCloud