-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Roll clang with fix for ABI change #44711
Conversation
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!). If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
7b645cb
to
57ea3f3
Compare
@dnfield A trial app with this fix made it through to testflight, so I think we're good to go. |
@@ -0,0 +1,42 @@ | |||
// Copyright 2013 The Flutter Authors. All rights reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a comment somewhere about why we need this and what it's doing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
D'oh! I added the comments below locally, and then forgot to upload them...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but please add the comment so we can remember this
57ea3f3
to
88e3837
Compare
…133220) flutter/engine@67e8b82...aa98a9d 2023-08-24 [email protected] [Impeller] Fix stencil buffer format selection on Vulkan backend, add support for D24UnormS8Uint (flutter/engine#45025) 2023-08-24 [email protected] Fix a clang-tidy error seen in the latest toolchain roll (flutter/engine#45039) 2023-08-23 [email protected] Roll Skia from a631fefdba37 to 9d4db3443527 (1 revision) (flutter/engine#45031) 2023-08-23 [email protected] Roll clang with fix for ABI change (flutter/engine#44711) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
In the change here llvm/llvm-project@b653a28, an intentional ABI breaking change was introduced to the clang runtime library for macOS and iOS. That change caused a symbol requiring dynamic linkage to be exposed that triggers iOS App Store checks for usage of private API. This PR resolves that issue by rolling clang forward and introducing a definition of `_availability_version_check`. The declaration with weak linkage in the clang runtime library [here](https://github.com/llvm/llvm-project/blob/b653a2823fe4b4c9c6d85cfe119f31d8e70c2fa0/compiler-rt/lib/builtins/os_version_check.c#L89) will then be resolved against the definition introduced in this PR. Since the declaration in the clang runtime library will now be resolved by static linking, the Flutter dylib will no longer require it to be dynamically linked, and will therefore not trigger the App Store check for using private API. The definition of `_availability_version_check` is implemented using the `dlsym` strategy used by the old version of clang [here](https://github.com/llvm/llvm-project/blob/f9ac5575675e4117c2e097a71ad0f02cab92aa97/compiler-rt/lib/builtins/os_version_check.c#L97). Fixes flutter/flutter#132130
This PR ports more of the implementation of availability checking from clang-rt into the Engine. In particular, when the call to look up the symbol `_availability_version_check` fails, this PR falls back on reading the platform version information out of a plist file at a well-known location, as is done [here](https://github.com/llvm/llvm-project/blob/2fd66e6eb659701b9d4c88708d55d5854a246815/compiler-rt/lib/builtins/os_version_check.c#L163). This change fixes a mistake in #44711, which didn't account for `_availability_version_check` not being available on iOS 11 and 12. Fixes flutter/flutter#138711
This PR ports more of the implementation of availability checking from clang-rt into the Engine. In particular, when the call to look up the symbol `_availability_version_check` fails, this PR falls back on reading the platform version information out of a plist file at a well-known location, as is done [here](https://github.com/llvm/llvm-project/blob/2fd66e6eb659701b9d4c88708d55d5854a246815/compiler-rt/lib/builtins/os_version_check.c#L163). This change fixes a mistake in flutter#44711, which didn't account for `_availability_version_check` not being available on iOS 11 and 12. Fixes flutter/flutter#138711
In the change here llvm/llvm-project@b653a28, an intentional ABI breaking change was introduced to the clang runtime library for macOS and iOS. That change caused a symbol requiring dynamic linkage to be exposed that triggers iOS App Store checks for usage of private API.
This PR resolves that issue by rolling clang forward and introducing a definition of
_availability_version_check
. The declaration with weak linkage in the clang runtime library here will then be resolved against the definition introduced in this PR. Since the declaration in the clang runtime library will now be resolved by static linking, the Flutter dylib will no longer require it to be dynamically linked, and will therefore not trigger the App Store check for using private API.The definition of
_availability_version_check
is implemented using thedlsym
strategy used by the old version of clang here.Fixes flutter/flutter#132130