summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libcxx/CMakeLists.txt8
-rw-r--r--libcxx/lib/CMakeLists.txt13
-rwxr-xr-xlibcxx/utils/merge_archives.py2
3 files changed, 12 insertions, 11 deletions
diff --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt
index 389d36f13e0..9658fe44ad9 100644
--- a/libcxx/CMakeLists.txt
+++ b/libcxx/CMakeLists.txt
@@ -359,13 +359,9 @@ elseif(LIBCXX_BUILD_32_BITS)
message(FATAL_ERROR "LIBCXX_BUILD_32_BITS=ON is not supported on this platform.")
endif()
-# Check that this option is not enabled on Apple and emit a usage warning.
+# Warn users that LIBCXX_ENABLE_STATIC_ABI_LIBRARY is an experimental option.
if (LIBCXX_ENABLE_STATIC_ABI_LIBRARY)
- if (APPLE)
- message(FATAL_ERROR "LIBCXX_ENABLE_STATIC_ABI_LIBRARY is not supported on OS X")
- else()
- message(WARNING "LIBCXX_ENABLE_STATIC_ABI_LIBRARY is an experimental option")
- endif()
+ message(WARNING "LIBCXX_ENABLE_STATIC_ABI_LIBRARY is an experimental option")
if (LIBCXX_ENABLE_STATIC AND NOT PYTHONINTERP_FOUND)
message(FATAL_ERROR "LIBCXX_ENABLE_STATIC_ABI_LIBRARY requires python but it was not found.")
endif()
diff --git a/libcxx/lib/CMakeLists.txt b/libcxx/lib/CMakeLists.txt
index 4397189464d..50b7e28aa1b 100644
--- a/libcxx/lib/CMakeLists.txt
+++ b/libcxx/lib/CMakeLists.txt
@@ -52,14 +52,19 @@ endif()
add_library_flags_if(LIBCXX_COVERAGE_LIBRARY "${LIBCXX_COVERAGE_LIBRARY}")
if (APPLE AND (LIBCXX_CXX_ABI_LIBNAME STREQUAL "libcxxabi" OR
- LIBCXX_CXX_ABI_LIBNAME STREQUAL "default"))
+ LIBCXX_CXX_ABI_LIBNAME STREQUAL "default")
+ AND NOT DEFINED LIBCXX_OSX_REEXPORT_LIBCXXABI_SYMBOLS)
set(LIBCXX_OSX_REEXPORT_LIBCXXABI_SYMBOLS ON)
endif()
if (LIBCXX_STATICALLY_LINK_ABI_IN_SHARED_LIBRARY)
- add_library_flags("-Wl,--whole-archive" "-Wl,-Bstatic")
- add_library_flags("${LIBCXX_CXX_ABI_LIBRARY}")
- add_library_flags("-Wl,-Bdynamic" "-Wl,--no-whole-archive")
+ if (APPLE)
+ add_library_flags("-Wl,-force_load" "${LIBCXX_CXX_ABI_LIBRARY}")
+ else()
+ add_library_flags("-Wl,--whole-archive" "-Wl,-Bstatic")
+ add_library_flags("${LIBCXX_CXX_ABI_LIBRARY}")
+ add_library_flags("-Wl,-Bdynamic" "-Wl,--no-whole-archive")
+ endif()
elseif (LIBCXX_OSX_REEXPORT_LIBCXXABI_SYMBOLS)
add_library_flags("${LIBCXX_CXX_ABI_LIBRARY}")
else ()
diff --git a/libcxx/utils/merge_archives.py b/libcxx/utils/merge_archives.py
index e57afab201f..75d7a54e47d 100755
--- a/libcxx/utils/merge_archives.py
+++ b/libcxx/utils/merge_archives.py
@@ -127,7 +127,7 @@ def main():
out = execute_command_verbose([ar_exe, 't', arc])
files.extend(out.splitlines())
- execute_command_verbose([ar_exe, 'rcsD', args.output] + files,
+ execute_command_verbose([ar_exe, 'rcs', args.output] + files,
cwd=temp_directory_root, verbose=args.verbose)
OpenPOWER on IntegriCloud