Add weak __libcpp_verbose_abort definition to app on iOS#1877
Open
AustinBenoit wants to merge 3 commits into
Open
Add weak __libcpp_verbose_abort definition to app on iOS#1877AustinBenoit wants to merge 3 commits into
AustinBenoit wants to merge 3 commits into
Conversation
On older iOS versions (iOS 15 and 16), the system libc++.1.dylib does not contain the `std::__1::__libcpp_verbose_abort` symbol. Since we build the Firebase C++ SDK binaries using a newer Xcode version (which references this symbol for standard library assertions), apps linking our static libraries will crash at startup on these older OS versions with a "Symbol not found" dynamic linker error. To resolve this: - Added a weak definition of `__libcpp_verbose_abort` to `app/src/app_ios.mm` so it is packaged into `libfirebase_app.a` and statically resolved for any linking application. - Removed the now-redundant temporary workaround definition from `testing/sample_framework/src/app_framework.cc`. Fixes #1872
Contributor
There was a problem hiding this comment.
Code Review
This pull request moves the workaround for the Xcode 15+ / Swift 5.10+ Concurrency and C++ verbose abort crash on older iOS versions from the sample framework to the core iOS app implementation, and updates the release notes accordingly. Feedback suggests using C++ standard library headers instead of C headers, and using the _LIBCPP_ABI_NAMESPACE macro instead of hardcoding the __1 inline namespace to make the workaround more robust.
4027531 to
e9cc811
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
On older iOS versions (iOS 15 and 16), the system libc++.1.dylib does not contain the
std::__1::__libcpp_verbose_abortsymbol. Since we build the Firebase C++ SDK binaries using a newer Xcode version (which references this symbol for standard library assertions), apps linking our static libraries will crash at startup on these older OS versions with a "Symbol not found" dynamic linker error. This was a change we had made to our test apps but we should include in to make the build process easier for all.To resolve this:
__libcpp_verbose_aborttoapp/src/app_ios.mmso it is packaged intolibfirebase_app.aand statically resolved for any linking application.testing/sample_framework/src/app_framework.cc.Fixes #1872
Testing
Ran a local test in ios 16 and verified the symbol is loading correctly. Will run the integration test to verify everything continues to work.
Type of Change
Place an
xthe applicable box:Notes
Release Notessection ofrelease_build_files/readme.md.