meta-intel/dynamic-layers/clang-layer/recipes-devtools/clang/files/llvm10-0002-Fix-building-in-tree-with-cmake-DLLVM_LINK_LLVM_DYLI.patch
Naveen Saini 109fe96793 llvm/10.0.0: apply opencl-clang recommend patches
https://github.com/intel/opencl-clang/tree/ocl-open-100/patches

Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-08-24 10:41:24 +08:00

34 lines
1.0 KiB
Diff

From 331e323ae2633a8999a660314022491d670c442c Mon Sep 17 00:00:00 2001
From: Andrea Bocci <andrea.bocci@cern.ch>
Date: Sun, 15 Mar 2020 17:35:44 +0100
Subject: [PATCH 2/3] Fix building in-tree with cmake -DLLVM_LINK_LLVM_DYLIB=ON
Building in-tree with LLVM 11.0 master with the LLVM_LINK_LLVM_DYLIB
cmake flag fails to link with the LLVMSPIRVLib library.
Add an explicit dependency to force the correct build order and linking.
Signed-off-by: Andrea Bocci <andrea.bocci@cern.ch>
Upstream-Status: Backport
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
---
tools/llvm-spirv/CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/llvm-spirv/CMakeLists.txt b/tools/llvm-spirv/CMakeLists.txt
index 9aa96d9c..501c0daf 100644
--- a/tools/llvm-spirv/CMakeLists.txt
+++ b/tools/llvm-spirv/CMakeLists.txt
@@ -14,7 +14,7 @@ add_llvm_tool(llvm-spirv
NO_INSTALL_RPATH
)
-if (LLVM_SPIRV_BUILD_EXTERNAL)
+if (LLVM_SPIRV_BUILD_EXTERNAL OR LLVM_LINK_LLVM_DYLIB)
target_link_libraries(llvm-spirv PRIVATE LLVMSPIRVLib)
endif()
--
2.17.1