summaryrefslogtreecommitdiff
path: root/CMake
diff options
context:
space:
mode:
authorZhigang Gong <zhigang.gong@intel.com>2014-02-08 11:16:43 +0800
committerZhigang Gong <zhigang.gong@intel.com>2014-02-11 17:23:06 +0800
commit6f096ed860916b5a13649e22bfe6104e25dea2af (patch)
treee1c48e3393095826b4bda918fb2efa3ceebe3909 /CMake
parent38d82357747a50715f998e0cda3852ca83871f79 (diff)
downloadbeignet-6f096ed860916b5a13649e22bfe6104e25dea2af.tar.gz
Add clang/LLVM 3.5svn support.
The clang/llvm 3.3 has some minor bugs such as the vector ++/-- which was fixed in 3.4. But the 3.4 version introduces severer OCL bugs as below: http://llvm.org/bugs/show_bug.cgi?id=18119 http://llvm.org/bugs/show_bug.cgi?id=18120 It seems that the community will only fix these bugs in the ToT version rather than the llvm 3.4 branch. I think we'd better to enable clang/llvm 3.5 in beignet. Currently, the 18120 was fixed in ToT, but 18119 still breaks us. When 18119 get fixed, I will switch the preferred version to 3.5. Please be noted, when you build clang/llvm 3.5, you need to enable the cxx11 to make it compatible with beignet. --enable-cxx11 v2: fix the llvm3.4 issue. Signed-off-by: Zhigang Gong <zhigang.gong@intel.com> Reviewed-by: "Yang, Rong R" <rong.r.yang@intel.com>
Diffstat (limited to 'CMake')
-rw-r--r--CMake/FindLLVM.cmake9
1 files changed, 9 insertions, 0 deletions
diff --git a/CMake/FindLLVM.cmake b/CMake/FindLLVM.cmake
index 6256cb00..1a37167c 100644
--- a/CMake/FindLLVM.cmake
+++ b/CMake/FindLLVM.cmake
@@ -72,6 +72,15 @@ execute_process(
OUTPUT_STRIP_TRAILING_WHITESPACE
)
+if (LLVM_VERSION_NODOT VERSION_GREATER 34)
+execute_process(
+ COMMAND ${LLVM_CONFIG_EXECUTABLE} --system-libs
+ OUTPUT_VARIABLE LLVM_SYSTEM_LIBS_ORIG
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+)
+string(REGEX REPLACE " *\n" "" LLVM_SYSTEM_LIBS ${LLVM_SYSTEM_LIBS_ORIG})
+endif (LLVM_VERSION_NODOT VERSION_GREATER 33)
+
macro(add_one_lib name)
FIND_LIBRARY(CLANG_LIB
NAMES ${name}