[PATCH] D86767: [libunwind] Minor SJLJ config cleanup. NFCI.

Steven Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 4 12:22:54 PDT 2020


steven_wu added a comment.

In D86767#2245775 <https://reviews.llvm.org/D86767#2245775>, @rprichard wrote:

> In D86767#2244767 <https://reviews.llvm.org/D86767#2244767>, @steven_wu wrote:
>
>> Sorry for the inconvenience that libunwind is not really buildable for armv7 from iOS SDK. You can build a single threaded version without referring to those interfaces. If this is really troublesome for you, feel free to file a bug report and we can see what can be done here.
>
> Thanks. I think I'm OK as-is.
>
>> This patch is technically not correct from a bigger context. I think, for example, watch `armv7k` doesn't default to sjlj exception model but it needs to build sjlj model to support some clients.
>
> That makes sense. It looks like passing `-arch armv7k` to clang is enough to switch it to using DWARF and compact unwinding rather than sjlj. I also see a comment in ToolChains/Darwin.cpp:
> `// Only watchOS uses the new DWARF/Compact unwinding method.`
>
> It seems that Darwin/armv7k libunwind doesn't build because config.h enables `_LIBUNWIND_SUPPORT_COMPACT_UNWIND`, but there is no 32-bit ARM compact unwinder. It looks like setting the flag is the right thing to do, though -- maybe the rest of the code is internal to Apple.
>
> I'll revise or abandon this patch. My main goal was to ensure that if `_LIBUNWIND_USE_DL_ITERATE_PHDR` was defined, then either of `_LIBUNWIND_ARM_EHABI` or `_LIBUNWIND_SUPPORT_DWARF_UNWIND` would also be defined.

Actually after looking some internal history, `armv7k` does not need SJLJ APIs for any version. The code was there original for some old compiler version doesn't have `__USING_SJLJ_EXCEPTIONS__` set correctly for all the targets we cared about. I guess we can clean it up if needed.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86767



More information about the llvm-commits mailing list