[PATCH] Workaround for CMake build to allow CMake build to work on OpenBSD

Brad Smith via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 19 11:18:43 PDT 2015


Fix the CMake build with a workaround. OpenBSD seems to have the
same issue as FreeBSD.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

-------------- next part --------------
Index: cmake/modules/HandleLLVMOptions.cmake
===================================================================
--- cmake/modules/HandleLLVMOptions.cmake	(revision 248093)
+++ cmake/modules/HandleLLVMOptions.cmake	(working copy)
@@ -132,7 +132,8 @@
 # Pass -Wl,-z,defs. This makes sure all symbols are defined. Otherwise a DSO
 # build might work on ELF but fail on MachO/COFF.
 if(NOT (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" OR WIN32 OR CYGWIN OR
-        ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") AND
+        ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR
+        ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD") AND
    NOT LLVM_USE_SANITIZER)
   set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,defs")
 endif()


More information about the llvm-commits mailing list