Page MenuHomePhabricator

[libc++abi][AIX] Use _LIBCXXABI_FUNC_VIS for exported routines
ClosedPublic

Authored by xingxue on Jun 2 2022, 1:31 PM.

Details

Summary

This patch adds _LIBCXXABI_FUNC_VIS to the definitions of the personality and helper routines for the state table based EH, now that the support of the visibility attribute is being added to AIX Clang. Currently an export list is generated in the absence of the visibility attribute support downstream.

Diff Detail

Event Timeline

xingxue created this revision.Jun 2 2022, 1:31 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 2 2022, 1:31 PM
Herald added a subscriber: StephenFan. · View Herald Transcript
xingxue requested review of this revision.Jun 2 2022, 1:31 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 2 2022, 1:31 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
MaskRay accepted this revision.Jun 5 2022, 11:49 AM

I see that https://discourse.llvm.org/t/rfc-adding-exported-visibility-style-to-the-ir-to-model-xcoff-exported-visibility/61853 says if no visibility bit (I assume n_type & SYM_V_MASK == 0) is set, the symbols need an export list.
I don't see how you use an export list for the libc++abi code, perhaps you maintain a down stream patch.

[NFC]

I assume that getting #define _LIBCXXABI_FUNC_VIS __attribute__((__visibility__("default"))) will have side effects, so [NFC] is inappropriate.

I see that https://discourse.llvm.org/t/rfc-adding-exported-visibility-style-to-the-ir-to-model-xcoff-exported-visibility/61853 says if no visibility bit (I assume n_type & SYM_V_MASK == 0) is set, the symbols need an export list.
I don't see how you use an export list for the libc++abi code, perhaps you maintain a down stream patch.

Thanks for your comments! Yes, export lists are currently used on AIX for libc++abi as well as other libraries downstream in the absence of attribute visibility.

[NFC]

I assume that getting #define _LIBCXXABI_FUNC_VIS __attribute__((__visibility__("default"))) will have side effects, so [NFC] is inappropriate.

I agree it is not [NFC] from the perspective of upstream, although _LIBCXXABI_FUNC_VIS has the same effect as the export list that has been used downstream.

xingxue retitled this revision from [libc++abi][AIX][NFC] Use _LIBCXXABI_FUNC_VIS for exported routines to [libc++abi][AIX] Use _LIBCXXABI_FUNC_VIS for exported routines.Jun 5 2022, 12:17 PM
xingxue edited the summary of this revision. (Show Details)Jun 5 2022, 12:24 PM

Hi @ldionne, Would you please take a look and if no further comments, accept for #libc_abi? Thanks!

daltenty accepted this revision.Jun 21 2022, 1:04 PM

LGTM, thanks!

This revision was not accepted when it landed; it landed in state Needs Review.Jun 21 2022, 1:19 PM
This revision was automatically updated to reflect the committed changes.