[PATCH] D158011: Make _LIBUNWIND_SUPPORT_FRAME_APIS not conditional on target architecure.

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 17 19:41:35 PDT 2023


MaskRay added a comment.

In D158011#4592705 <https://reviews.llvm.org/D158011#4592705>, @philnik wrote:

> In D158011#4589757 <https://reviews.llvm.org/D158011#4589757>, @saugustine wrote:
>
>> What exactly do you recommend here? The situation is pretty messy.
>>
>> Today the macro only guards them for target architecture, so they are enabled for Darwin on x86 today, but not Darwin on aarch64. That is true for every single OS that runs on (one of x86, x86_64, and powerpc) and anything else.
>>
>> So the same problems that exist for Darwin also exist for Fuschia and FreeBSD and many others.
>>
>> Perhaps a top-level CMake option would be best.
>
> I think this is actually required on Darwin, since Apple used to ship libstdc++ on x86 at some point in the past. A CMake option seems to me like the sensible solution. Adding libc++ vendors, since they might have some insight here.

These symbols are unneeded by ELF systems. See D158241 <https://reviews.llvm.org/D158241> for an analysis of GCC and Clang.

It's fairly likely that Mac OS doesn't need them as well.
It's possible that Power Mac (llvm-project has dropped support) needed the symbols at one point as a workaround, or these empty symbols were just added for no good reason. (https://en.wikipedia.org/wiki/Mac_transition_to_Intel_processors https://en.wikipedia.org/wiki/Mac_transition_to_Apple_silicon)
It's likely 10+ years no new `__register_frame_info` references has been generated.

I think defaulting LIBUNWIND_ENABLE_FRAME_APIS to OFF is fine.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D158011



More information about the llvm-commits mailing list