This is an archive of the discontinued LLVM Phabricator instance.

[compiler-rt] Check __SEH__, when checking if ARM EHABI is implied
ClosedPublic

Authored by mstorsjo on Jun 2 2022, 2:33 AM.

Details

Summary

ARM EHABI isn't signalled by any specific compiler builtin define,
but is implied by the lack of defines specifying any other
exception handling mechanism, __USING_SJLJ_EXCEPTIONS__ or
__ARM_DWARF_EH__.

As Windows SEH also can be used for unwinding, check for the
__SEH__ define too, in the same way.

Diff Detail

Event Timeline

mstorsjo created this revision.Jun 2 2022, 2:33 AM
mstorsjo requested review of this revision.Jun 2 2022, 2:33 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 2 2022, 2:33 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript

@MaskRay Can you have a look at these runtimes/headers patches?

  • This one, D126865 and D126866 are all the same change in different subprojects, and should be quite trivial.
  • D126867 is more of the same plus some other simple fixes for libunwind.
  • And finally D126868 and D126869 are a bit more complex, but have been pre-reviewed by someone else familiar with the domain.
MaskRay accepted this revision.EditedJun 5 2022, 11:40 AM

LGTM. As mentioned in another patch, it'd be good to let the second patch adding !defined(__ARM_DWARF_EH__) && !defined(__SEH__) refer to the first patch, depending on the order you land these patches:)

Perhaps a [builtins] tag may be more specific.

This revision is now accepted and ready to land.Jun 5 2022, 11:40 AM
This revision was landed with ongoing or failed builds.Jun 6 2022, 1:28 PM
This revision was automatically updated to reflect the committed changes.