about summary refs log tree commit diff homepage
path: root/cmake/find_llvm.cmake
diff options
context:
space:
mode:
authorCristian Cadar <c.cadar@imperial.ac.uk>2016-12-23 16:12:03 +0000
committerGitHub <noreply@github.com>2016-12-23 16:12:03 +0000
commita59bb9e8291edfef5d6289494019acfbcb21f63a (patch)
treeaeaadd1f0d7b809a6879eb95a32892180b6c44fa /cmake/find_llvm.cmake
parentba009ba1f66396f0951c703e6a68e393d01be7af (diff)
parent339b87f9da680e93e7e38b1522486953a3ff3a4f (diff)
downloadklee-a59bb9e8291edfef5d6289494019acfbcb21f63a.tar.gz
Merge pull request #552 from delcypher/macos_fixes
macOS fixes
Diffstat (limited to 'cmake/find_llvm.cmake')
-rw-r--r--cmake/find_llvm.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmake/find_llvm.cmake b/cmake/find_llvm.cmake
index 53b2b392..0df6b4b5 100644
--- a/cmake/find_llvm.cmake
+++ b/cmake/find_llvm.cmake
@@ -33,6 +33,8 @@ if (USE_CMAKE_FIND_PACKAGE_LLVM)
     endif()
     set(${output_var} ${${output_var}} PARENT_SCOPE)
   endfunction()
+  # HACK: This information is not exported so just pretend its OFF for now.
+  set(LLVM_ENABLE_VISIBILITY_INLINES_HIDDEN OFF)
 else()
   # Use the llvm-config binary to get the information needed.
   # Try to detect it in the user's environment. The user can
@@ -116,6 +118,7 @@ else()
   set(LLVM_ENABLE_ASSERTIONS ON)
   set(LLVM_ENABLE_EH ON)
   set(LLVM_ENABLE_RTTI ON)
+  set(LLVM_ENABLE_VISIBILITY_INLINES_HIDDEN OFF)
   _run_llvm_config(_llvm_cxx_flags "--cxxflags")
   string_to_list("${_llvm_cxx_flags}" _llvm_cxx_flags_list)
   foreach (flag ${_llvm_cxx_flags_list})
@@ -127,6 +130,8 @@ else()
       set(LLVM_ENABLE_EH OFF)
     elseif ("${flag}" STREQUAL "-fno-rtti")
       set(LLVM_ENABLE_RTTI OFF)
+    elseif ("${flag}" STREQUAL "-fvisibility-inlines-hidden")
+      set(LLVM_ENABLE_VISIBILITY_INLINES_HIDDEN ON)
     endif()
   endforeach()