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
Paths
| Differential D86881
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 TimelineHerald added subscribers: dang, ributzka, dexonsmith, jkorous. · View Herald TranscriptAug 31 2020, 9:52 AM This revision is now accepted and ready to land.Sep 1 2020, 9:49 AM Closed by commit rGd46f2c51e4c8: Make -fvisibility-inlines-hidden apply to static local variables in inline… (authored by erik.pilkington). · Explain WhySep 2 2020, 9:19 AM This revision was automatically updated to reflect the committed changes. Comment Actions 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. Comment Actions 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. Comment Actions
The Darwin -fvisibility-inlines-hidden-static-local-var hack is still present on Clang 16 trunk. Any update on this?
Revision Contents
Diff 288968 clang/include/clang/Basic/LangOptions.def
clang/include/clang/Driver/Options.td
clang/lib/AST/Decl.cpp
clang/lib/Driver/ToolChains/Clang.cpp
clang/lib/Driver/ToolChains/Darwin.cpp
clang/lib/Frontend/CompilerInvocation.cpp
clang/test/CodeGenCXX/visibility-inlines-hidden-static-local-var.cpp
clang/test/Driver/darwin-objc-options.m
|