forked from OSchip/llvm-project
Only disable linker script when LIBCXX_CXX_ABI_LIBNAME is none
llvm-svn: 251063
This commit is contained in:
parent
571367e0cd
commit
bb90685aef
|
@ -67,6 +67,20 @@ set(LIBCXX_CXX_ABI "${LIBCXX_CXX_ABI}" CACHE STRING
|
|||
set(CXXABIS none libcxxabi libcxxrt libstdc++ libsupc++)
|
||||
set_property(CACHE LIBCXX_CXX_ABI PROPERTY STRINGS ;${CXXABIS})
|
||||
|
||||
# Setup the default options if LIBCXX_CXX_ABI is not specified.
|
||||
if (NOT LIBCXX_CXX_ABI)
|
||||
if (NOT DEFINED LIBCXX_BUILT_STANDALONE AND
|
||||
IS_DIRECTORY "${CMAKE_SOURCE_DIR}/projects/libcxxabi")
|
||||
set(LIBCXX_CXX_ABI_LIBNAME "libcxxabi")
|
||||
set(LIBCXX_CXX_ABI_INCLUDE_PATHS "${CMAKE_SOURCE_DIR}/projects/libcxxabi/include")
|
||||
set(LIBCXX_CXX_ABI_INTREE 1)
|
||||
else ()
|
||||
set(LIBCXX_CXX_ABI_LIBNAME "none")
|
||||
endif ()
|
||||
else ()
|
||||
set(LIBCXX_CXX_ABI_LIBNAME "${LIBCXX_CXX_ABI}")
|
||||
endif ()
|
||||
|
||||
# Use a static copy of the ABI library when linking libc++. This option
|
||||
# cannot be used with LIBCXX_ENABLE_ABI_LINKER_SCRIPT.
|
||||
option(LIBCXX_ENABLE_STATIC_ABI_LIBRARY "Statically link the ABI library" OFF)
|
||||
|
@ -78,8 +92,7 @@ option(LIBCXX_ENABLE_STATIC_ABI_LIBRARY "Statically link the ABI library" OFF)
|
|||
# or is specified to be "none".
|
||||
set(ENABLE_LINKER_SCRIPT_DEFAULT_VALUE OFF)
|
||||
if (LLVM_HAVE_LINK_VERSION_SCRIPT AND NOT LIBCXX_ENABLE_STATIC_ABI_LIBRARY
|
||||
AND LIBCXX_CXX_ABI
|
||||
AND NOT LIBCXX_CXX_ABI STREQUAL "none"
|
||||
AND NOT LIBCXX_CXX_ABI_LIBNAME STREQUAL "none"
|
||||
AND PYTHONINTERP_FOUND)
|
||||
set(ENABLE_LINKER_SCRIPT_DEFAULT_VALUE ON)
|
||||
endif()
|
||||
|
|
|
@ -61,19 +61,6 @@ macro(setup_abi_lib abidefines abilib abifiles abidirs)
|
|||
|
||||
endmacro()
|
||||
|
||||
# Setup the default options if LIBCXX_CXX_ABI is not specified.
|
||||
if (NOT LIBCXX_CXX_ABI)
|
||||
if (NOT DEFINED LIBCXX_BUILT_STANDALONE AND
|
||||
IS_DIRECTORY "${CMAKE_SOURCE_DIR}/projects/libcxxabi")
|
||||
set(LIBCXX_CXX_ABI_LIBNAME "libcxxabi")
|
||||
set(LIBCXX_CXX_ABI_INCLUDE_PATHS "${CMAKE_SOURCE_DIR}/projects/libcxxabi/include")
|
||||
set(LIBCXX_CXX_ABI_INTREE 1)
|
||||
else ()
|
||||
set(LIBCXX_CXX_ABI_LIBNAME "none")
|
||||
endif ()
|
||||
else ()
|
||||
set(LIBCXX_CXX_ABI_LIBNAME "${LIBCXX_CXX_ABI}")
|
||||
endif ()
|
||||
|
||||
# Configure based on the selected ABI library.
|
||||
if ("${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "libstdc++" OR
|
||||
|
|
Loading…
Reference in New Issue