[PATCH] [libcxx] Add support for linking libc++ against a static ABI library.
Eric Fiselier
eric at efcs.ca
Mon Mar 2 14:49:22 PST 2015
Address inline comments.
================
Comment at: cmake/Modules/HandleLibCXXABI.cmake:85
@@ -82,1 +84,3 @@
+ set(CXXABI_LIBNAME cxxabi_shared)
+ endif()
set(LIBCXX_LIBCPPABI_VERSION "2" PARENT_SCOPE)
----------------
compnerd wrote:
> Why do you change the name of the library, the name should stay the same, its the extension that changes (and I believe should be implicit based on add_library).
The actual library name ('libc++abi.so' or 'libc++abi.a') doesn't change. These are CMake target names for when libc++abi and libc++ are being built intree together.
================
Comment at: lib/CMakeLists.txt:41
@@ -40,1 +40,3 @@
+set(libraries "")
+if (LIBCXX_ENABLE_STATIC_ABI_LIBRARY)
----------------
compnerd wrote:
> Can you add this in side of a check for the linker type? The options are very GNU centric.
Sounds like a good change. I'll look into it.
================
Comment at: test/CMakeLists.txt:47
@@ -46,1 +46,3 @@
pythonize_bool(LIBCXX_ENABLE_MONOTONIC_CLOCK)
+ # The tests shouldn't link to any ABI library when it has been linked into
+ # libc++ statically.
----------------
compnerd wrote:
> Can you explain why this is correct? The tests are meant to test libc++abi. They should link to it either statically or dynamically as built. The libc++ tests however, should not.
Because when libc++ statically links to libc++abi then all of the symbols from libc++abi should be available via libc++. If we don't do this and always link the tests to libc++abi then it could hide errors where libc++ doesn't properly expose the required symbols.
http://reviews.llvm.org/D8017
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the cfe-commits
mailing list