[libcxx-commits] [PATCH] D57872: [CMake] Split linked libraries for shared and static libc++

Shoaib Meenai via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Mar 6 22:30:56 PST 2019


smeenai added inline comments.


================
Comment at: libcxx/lib/CMakeLists.txt:54-55
 else ()
- add_interface_library("${LIBCXX_CXX_ABI_LIBRARY}")
+  list(APPEND LIBCXX_SHARED_LIBRARIES "${LIBCXX_CXX_ABI_LIBRARY}")
+  list(APPEND LIBCXX_INTERFACE_LIBRARIES "${LIBCXX_CXX_ABI_LIBRARY}")
 endif()
----------------
The commit message mentions eliminating LIBCXX_INTERFACE_LIBRARIES, but that doesn't appear to be the case. Did you mean getting rid of `LIBCXX_LIBRARIES`?

This looks equivalent to `add_interface_library` if you replaced `LIBCXX_LIBRARIES` with `LIBCXX_SHARED_LIBRARIES` in that macro, and it looks like you're also appending to `LIBCXX_SHARED_LIBRARIES` in all the places you append to `LIBCXX_INTERFACE_LIBRARIES`, so the macro could still be useful.


================
Comment at: libcxx/lib/CMakeLists.txt:396
   set(LIBCXX_INTERFACE_LIBRARY_NAMES)
-  foreach(lib ${LIBCXX_INTERFACE_LIBRARIES})
+  foreach(lib IN LISTS LIBCXX_INTERFACE_LIBRARIES)
     # FIXME: Handle cxxabi_static and unwind_static.
----------------
What does this change in practice?


Repository:
  rCXX libc++

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57872/new/

https://reviews.llvm.org/D57872





More information about the libcxx-commits mailing list