[PATCH] [libcxxabi] Build both static and shared versions of libc++abi by default.

Saleem Abdulrasool compnerd at compnerd.org
Mon Mar 2 14:47:19 PST 2015


================
Comment at: src/CMakeLists.txt:75
@@ -85,2 +74,2 @@
       "-install_name /usr/lib/libc++abi.1.dylib")
   endif()
----------------
You've added the option to build static.  Great, let me enable that, on Darwin.  You just built it dynamically here.  I think that you should either add an FATAL_ERROR message if static is used on Darwin (which I think is harsh) or support both builds on Darwin as well.

================
Comment at: src/CMakeLists.txt:83
@@ -91,1 +82,3 @@
+# Add a object library that contains the compiled source files.
+add_library(cxxabi_sources OBJECT ${LIBCXXABI_SOURCES} ${LIBCXXABI_HEADERS})
 
----------------
This is a weird name.  It is rather misleading as well.  I get why you are doing the object library (no need to rebuild the objects).  Perhaps cxxabi_OBJECTS ?  Given that you are changing the name of the target from cxxabi to cxxabi_{shared,static}, cxxabi would be even better.  Specially when you use the generator expression below ($<TARGET_OBJECTS:cxxabi>).

================
Comment at: src/CMakeLists.txt:90
@@ -100,2 +89,3 @@
 
-install(TARGETS cxxabi
+set(LIBCXXABI_TARGETS "")
+
----------------
Better written as:

  set(LIBCXXABI_TARGETS)

http://reviews.llvm.org/D8013

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list