mirror of
https://github.com/intel/llvm.git
synced 2026-01-26 21:53:12 +08:00
Fix CMake configuration errors on OS X
llvm-svn: 296954
This commit is contained in:
@@ -416,13 +416,16 @@ if (LIBCXXABI_HAS_EXTERNAL_THREAD_API)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(LIBCXXABI_HAS_UNDEFINED_SYMBOLS ((NOT LIBCXXABI_ENABLE_NEW_DELETE_DEFINITIONS)
|
||||
OR (LIBCXXABI_BUILD_EXTERNAL_THREAD_LIBRARY AND LIBCXXABI_ENABLE_SHARED)))
|
||||
set(LIBCXXABI_HAS_UNDEFINED_SYMBOLS OFF)
|
||||
if ((NOT LIBCXXABI_ENABLE_NEW_DELETE_DEFINITIONS)
|
||||
OR (LIBCXXABI_BUILD_EXTERNAL_THREAD_LIBRARY AND LIBCXXABI_ENABLE_SHARED))
|
||||
set(LIBCXXABI_HAS_UNDEFINED_SYMBOLS ON)
|
||||
endif()
|
||||
|
||||
if (LIBCXXABI_HAS_UNDEFINED_SYMBOLS)
|
||||
# Need to allow unresolved symbols if this is to work with shared library builds
|
||||
if (APPLE)
|
||||
add_link_flags("-undefined dynamic_lookup")
|
||||
list(APPEND LIBCXXABI_LINK_FLAGS "-undefined dynamic_lookup")
|
||||
else()
|
||||
# Relax this restriction from HandleLLVMOptions
|
||||
string(REPLACE "-Wl,-z,defs" "" CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
|
||||
|
||||
Reference in New Issue
Block a user