Skip to content

Commit

Permalink
Adapt cmake files for static linking
Browse files Browse the repository at this point in the history
  • Loading branch information
plusun committed Jun 5, 2018
1 parent d05b8fc commit 5027690
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Expand Up @@ -788,7 +788,7 @@ endif()
# check its symbols. This is wasteful (the check was done when foo.so
# was created) and can fail since it is not the dynamic linker and
# doesn't know how to handle search paths correctly.
if (UNIX AND NOT APPLE AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "SunOS|AIX|NetBSD")
if (UNIX AND NOT APPLE AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "SunOS|AIX")
set(CMAKE_EXE_LINKER_FLAGS
"${CMAKE_EXE_LINKER_FLAGS} -Wl,-allow-shlib-undefined")
endif()
Expand Down
3 changes: 3 additions & 0 deletions cmake/modules/AddLLVM.cmake
Expand Up @@ -774,6 +774,9 @@ macro(add_llvm_executable name)
endmacro(add_llvm_executable name)

function(export_executable_symbols target)
if (LLVM_BUILD_STATIC AND ${CMAKE_SYSTEM_NAME} MATCHES "NetBSD")
return()
endif()
if (LLVM_EXPORTED_SYMBOL_FILE)
# The symbol file should contain the symbols we want the executable to
# export
Expand Down

0 comments on commit 5027690

Please sign in to comment.