[libcxx-commits] [PATCH] D151387: [libc++][libunwind] Fixes to allow GCC 13 to compile libunwind/libc++abi/libc++

Zibi Sarbino via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jun 5 11:59:04 PDT 2023


zibi added inline comments.


================
Comment at: libunwind/src/CMakeLists.txt:161
       LINK_FLAGS "${LIBUNWIND_LINK_FLAGS}"
-      LINKER_LANGUAGE C
+      LINKER_LANGUAGE CXX
       OUTPUT_NAME "${LIBUNWIND_SHARED_OUTPUT_NAME}"
----------------
MaskRay wrote:
> mstorsjo wrote:
> > mstorsjo wrote:
> > > philnik wrote:
> > > > mstorsjo wrote:
> > > > > arichardson wrote:
> > > > > > Why is this needed? Shouldn't it work without linking c++abi/standard library?
> > > > > Indeed, libunwind must not rely on the C++ standard library - that's a layering violation. What's the issue that this tries to fix?
> > > > > 
> > > > > libunwind explicitly doesn't even include C++ standard library headers (building with `-nostdinc++`) in order to stay clear of any dependencies on it. Not sure if any of the CI configurations would show the issue here, but if we'd have the new CI configuration from D150766 merged, that one most definitely would fail on this change.
> > > > GCC 13 doesn't accept `-nostdlib++` in C mode. Given that these flags are passed explicitly, I don't think there should be a problem with invoking the driver in C++ mode.
> > > Oh, right, we use that too - yes, with `-nostdlib++` it's probably fine. But it would be nice to have D150766 in place so we'd have better CI coverage of that aspect.
> > > 
> > > I can run this patch through a test build from scratch in my config to be sure.
> > This did build fine for me, so consider this objection withdrawn.
> D95875 added `-nostdlib++` here. Can we remove it or make it z/OS specific @zibi @SeanP 
The `-nostdlib++` can be removed. It was initially added for consistency with libcxx and libcxxabi configurations but those are built with CXX.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D151387



More information about the libcxx-commits mailing list