[libcxx-commits] [PATCH] D95875: [SystemZ][ZOS] Prefer -nostdlib++ as opposed to -nodefaultlibs when building c++ libraries

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Feb 8 13:05:02 PST 2021


ldionne added inline comments.


================
Comment at: libcxx/CMakeLists.txt:729
+
+# In order to remove just a c++ library from the libc++ link step
+# we need to use -nostdlib++ whenever it is supported.
----------------
"In order to remove just libc++ from the link step"


================
Comment at: libcxx/cmake/config-ix.cmake:27
 
-# libc++ is built with -nodefaultlibs, so we want all our checks to also
-# use this option, otherwise we may end up with an inconsistency between
+# The libc++ is using -nostdlib++ at the link step when available,
+# otherwise -nodefaultlibs is used. We want all our checks to also
----------------
Remove "The"


================
Comment at: libcxx/cmake/config-ix.cmake:46
+
+if (LIBCXX_SUPPORTS_NOSTDLIBXX_FLAG OR LIBCXX_SUPPORTS_NODEFAULTLIBS_FLAG)
   if (LIBCXX_HAS_C_LIB)
----------------
I would have expected that this conditional be `if (NOT LIBCXX_SUPPORTS_NOSTDLIBXX_FLAG AND LIBCXX_SUPPORTS_NODEFAULTLIBS_FLAG)` instead. Indeed, if we use `-nostdlib++`, we shouldn't need to add these system libraries manually, right?


================
Comment at: libcxxabi/cmake/config-ix.cmake:17
 
-# libc++abi is built with -nodefaultlibs, so we want all our checks to also
-# use this option, otherwise we may end up with an inconsistency between
+# The libc++abi is using -nostdlib++ at the link step when available,
+# otherwise -nodefaultlibs is used. We want all our checks to also
----------------
Remove "The"


================
Comment at: libunwind/cmake/config-ix.cmake:19
 
-# libunwind is built with -nodefaultlibs, so we want all our checks to also
-# use this option, otherwise we may end up with an inconsistency between
+# The libunwind is using -nostdlib++ at the link step when available,
+# otherwise -nodefaultlibs is used. We want all our checks to also
----------------
Remove "The"


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D95875



More information about the libcxx-commits mailing list