Disable linker scripts when the ABI library is not specified or is none.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@251062 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0d60eef..0bbe5d4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -74,9 +74,12 @@
# Generate and install a linker script inplace of libc++.so. The linker script
# will link libc++ to the correct ABI library. This option is on by default
# On UNIX platforms other than Apple unless 'LIBCXX_ENABLE_STATIC_ABI_LIBRARY'
-# is on.
+# is on. This option is also disabled when the ABI library is not specified
+# 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 PYTHONINTERP_FOUND)
set(ENABLE_LINKER_SCRIPT_DEFAULT_VALUE ON)
endif()