[libcxx-commits] [PATCH] D60276: [libc++] Localize CMake code only related to the shared library

Shoaib Meenai via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Apr 5 12:20:44 PDT 2019


smeenai accepted this revision.
smeenai added a comment.
This revision is now accepted and ready to land.

LGTM. Thanks for doing this!

You may wanna wait for @phosek as well, since he's been doing a bunch of build work here too.



================
Comment at: libcxx/lib/CMakeLists.txt:177
+    if (APPLE)
+      target_link_libraries(cxx_shared PRIVATE "-Wl,-force_load" "$<TARGET_LINKER_FILE:${LIBCXX_CXX_STATIC_ABI_LIBRARY}>")
+    else()
----------------
Ah, so CMake adds the implicit dependency even with the generator expression form, as long as the generator expression is its own argument? That's useful.

I kinda prefer not having the generator expression here, just cos it's standard CMake convention to just use a target name directly, and cos then it seems more intuitive that the dependency gets added. I'm not gonna lose any sleep if this goes in as-is though.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D60276





More information about the libcxx-commits mailing list