Calling dlsym with RTLD_DEFAULT can be very slow as all images in the process are searched for the symbol.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
After this change, Apple App Store is rejecting Flutter apps with the following error message:
ITMS-90338: Non-public API usage - The app references non-public symbols in Frameworks/Flutter.framework/Flutter: __availability_version_check
I can confirm that this change results in undefined __availability_version_check symbol:
$ nm Flutter.xcframework/ios-arm64/Flutter.framework/Flutter | grep __availability_version_check U __availability_version_check
Is that intentional? Does App Store need to be updated? Would it be possible to revert this change in the meantime?
We are currently investigating this issue.
Are you (Flutter) using your custom toolchain based on ToT instead of the current shipping Xcode toolchain to build the app?
Thanks for taking a look!
Are you (Flutter) using your custom toolchain based on ToT instead of the current shipping Xcode toolchain to build the app?
Yes, we use our Clang toolchain that tracks tip-of-tree.
Hi @phosek!
App Store only supports currently shipping Xcode toolchains. For clients building Apps with the current non-beta Xcode and submitting to the App Store, the Flutter framework needs to be built and distributed with the current Xcode.
Flutter builds Flutter.framework with a ToT clang toolchain. We've been doing that for a few years now.
End users building applications to submit to the store package a pre-built Flutter.framework using Xcode.
I'm realizing I wasn't quite right on that.
Flutter _used_ to routinely build the dylib using some non-Xcode version of Clang for a while. We then switched to Xcode to make sure we could have compatible bitcode when building with an Xcode toolchain, but I think only for binaries that could end up being shipped to the store. Sometime since the store dropped bitcode support, we went back to using upstream Clang. This enables us avoid the need to support multiple Clang toolchains in our build, and in particular we can use a distributed compiler backend when using this version of Clang that we can't use when using Xcode.