This is an archive of the discontinued LLVM Phabricator instance.

Make -fvisibility-inlines-hidden apply to static local variables in inline functions on Darwin
ClosedPublic

Authored by erik.pilkington on Aug 31 2020, 9:52 AM.

Details

Summary

This effectively disables https://reviews.llvm.org/D50968 on Darwin, and provides a command line flag to opt into/out of this behaviour. This change is needed to compile certain Apple headers correctly.

rdar://47688592

Diff Detail

Event Timeline

erik.pilkington requested review of this revision.Aug 31 2020, 9:52 AM
arphaman accepted this revision.Sep 1 2020, 9:49 AM
This revision is now accepted and ready to land.Sep 1 2020, 9:49 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 2 2020, 9:19 AM

But this (re-)breaks the functionality of -fvisibility-inlines-hidden on Darwin. That seems bad? I'd've liked to see more of an explanation as to why this was considered a necessary breakage.

Agreed. This feels like a workaround. Can the offending projects be fixed?

Hey, thanks for following up on this PR. I've done some more digging and I think we can remove this Darwin-specific workaround in the near future. I'm hoping to provide an update in the next few weeks.

sberg added a subscriber: sberg.Dec 21 2022, 12:18 AM

Hey, thanks for following up on this PR. I've done some more digging and I think we can remove this Darwin-specific workaround in the near future. I'm hoping to provide an update in the next few weeks.

The Darwin -fvisibility-inlines-hidden-static-local-var hack is still present on Clang 16 trunk. Any update on this?

Herald added a project: Restricted Project. · View Herald TranscriptDec 21 2022, 12:18 AM