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

Zibi Sarbino via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Feb 8 13:36:32 PST 2021


zibi marked 5 inline comments as done.
zibi added inline comments.


================
Comment at: libcxx/cmake/config-ix.cmake:46
+
+if (LIBCXX_SUPPORTS_NOSTDLIBXX_FLAG OR LIBCXX_SUPPORTS_NODEFAULTLIBS_FLAG)
   if (LIBCXX_HAS_C_LIB)
----------------
ldionne wrote:
> 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?
That would cause cmake test for -nostdinc++ to fail and eventually it would lead to CI failure. See this [[ https://buildkite.com/llvm-project/libcxx-ci/builds/1239#08763c32-d463-4110-a7b4-54e7b19c710a | failure ]]. The root of the problem is that -nostdinc++ was missing from the compile command because cmake thought this option was not supported.


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