[libcxx-commits] [PATCH] D151387: [libc++][libunwind] Fixes to allow GCC 13 to compile libunwind/libc++abi/libc++
Nikolas Klauser via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu May 25 07:51:17 PDT 2023
philnik 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}"
----------------
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.
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