-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[release/6.0][android] pick fixes for building Android stdlib and swift-foundation to swift 6 #77626
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
[release/6.0][android] pick fixes for building Android stdlib and swift-foundation to swift 6 #77626
Conversation
(cherry-picked from commit 5905dc9)
Introduce the first APINotes injection for the Android platform. This follows the VCRuntime pattern of permitting the SDK to provide API Notes that augment the system SDK. This adds a workaround for incorrect nullability on the `fts_open` function in bionic. The system library itself is fixed at: https://android-review.googlesource.com/c/platform/bionic/+/3151616 (cherry-picked from 47f9d78)
…lesystem.apinotes This apinote file needs to be accessible in the locally built Android SDK as it's being built with build.ps1, so that swift-foundation can be built with that file present. This change ensures that the file is copied over into the local build directory for that Android SDK, in addition to being included in the installed component This change also places the component into lib/swift/apinotes, as that's where the clang importer already looks for API notes (cherry-picked from c036270)
@swift-ci please test |
set(NOSWIFTRT_KEYWORD "NOSWIFTRT") | ||
else() | ||
set(NOSWIFTRT_KEYWORD "") | ||
endif() |
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.
Why does this get handled differently from the other targets?
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.
The API notes changes would be useful for my Android SDK bundle too.
The remaining CMake and concurrency changes are in trunk already and have not caused a problem for the trunk SDK bundle produced by my Android CI, so should be fine.
@swift-ci please test |
CC @DougGregor |
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.
Thanks for cherry-picking these
@swift-ci please test Windows |
Explanation:
This change adds missing cherry-picks for building Android stdlib and swift-foundation to swift 6.
These changes add missing cache files for x86_64 and x86 stdlib, ensures that builtin float isn't built for Android, fixes two minor stdlib build issues, adds
"-Wgnu-offsetof-extensions"
pragma to avoid a compile error, and introduces the posix_filesystem.apinotes file that is needed to build swift-foundation.Scope:
Cmake Stdlib build.
Issues:
N/A
Original PRs:
PRs:
utils: support building android SDKs on Windows #72014
[android] fix path and cmake local build target tracking for posix_fi… #75494
ClangImporter: add support for Android API Notes #74829
picks:
Relatively low. Impacts mostly on Android bits, and introduces a cmake flag for hiding the build of builtin float overlay. Also fixes
NOSWIFTRT
flag used when building the stdlib's swift-reflection-test.Local android build testing, and thebrowsercompany/swift-build build testing.
Validated when building the windows stdlib as well.
@compnerd