[PATCH] D49834: [CMake] Don't generate linker script only when shared library isn't statically linked

Petr Hosek via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 25 21:26:42 PDT 2018


phosek created this revision.
phosek added reviewers: EricWF, ldionne, mclow.lists.
Herald added subscribers: cfe-commits, christof, mgorny.

Since r337668, we support statically linking dependencies only to shared
or static library. However, that change hasn't updated the check whether
to generate a linker script. We shouldn't generate linker script only in
the case when we aren't statically linked ABI into the shared library.


Repository:
  rCXX libc++

https://reviews.llvm.org/D49834

Files:
  libcxx/CMakeLists.txt


Index: libcxx/CMakeLists.txt
===================================================================
--- libcxx/CMakeLists.txt
+++ libcxx/CMakeLists.txt
@@ -175,7 +175,7 @@
 # is on. This option is also disabled when the ABI library is not specified
 # or is specified to be "none".
 set(ENABLE_LINKER_SCRIPT_DEFAULT_VALUE OFF)
-if (LLVM_HAVE_LINK_VERSION_SCRIPT AND NOT LIBCXX_ENABLE_STATIC_ABI_LIBRARY
+if (LLVM_HAVE_LINK_VERSION_SCRIPT AND NOT LIBCXX_STATICALLY_LINK_ABI_IN_SHARED_LIBRARY
       AND NOT LIBCXX_CXX_ABI_LIBNAME STREQUAL "none"
       AND NOT LIBCXX_CXX_ABI_LIBNAME STREQUAL "default"
       AND PYTHONINTERP_FOUND


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49834.157421.patch
Type: text/x-patch
Size: 629 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180726/151fe05b/attachment-0001.bin>


More information about the cfe-commits mailing list