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

Martin Storsjö via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu May 25 12:39:01 PDT 2023


mstorsjo 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}"
----------------
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.


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