-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[6.2][build] Make it possible to build a cross-compilation toolchain for Android, including Testing #83503
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
Open
finagolfin
wants to merge
5
commits into
swiftlang:release/6.2
Choose a base branch
from
finagolfin:droid
base: release/6.2
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
@swift-ci test |
@swift-ci test |
@swift-ci test |
@swift-ci smoke test macos |
@swift-ci test macos |
@bnbarham, completely safe pull that only affects Android, please review. |
Android 15+ requires that native libraries be compiled with a linker flag to support 16 KB page sizes. See: https://developer.android.com/guide/practices/page-sizes#compile-r26-lower
…` from fcc0389, specifically the change that makes the following possible on linux: "* under Linux, do not cross compile LLVM when building for the host architecture -- that will ensure that the compiler-rt build will use the just built compiler and not the system one (which may not be new enough for this purpose);"
…wiftlang#83260) Also, disable a recently failing test for Android armv7.
This new flag makes it easy to build Swift cross-compilation toolchains, by disabling cross-compilation of all host tools, like the Swift compiler and various macros, building on prior pulls swiftlang#38441 and swiftlang#82163. Also, add two class methods to the Testing macros product so it works with swiftlang#83260.
I missed that `build-script` passes back `false` instead, so use the `true_false` function for broader checking.
@swift-ci test |
@bnbarham, not sure if you saw my ping this weekend, but can we get this in before the new 6.2.0 branch diverges? |
Ah sorry, I did not. This isn't really my area though - CC @shahmishal |
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.
Explanation: Add a linker flag for the upcoming 16 KB page support in Android, generate an Android CMake toolchain file that can be used to cross-compile repos like cmark and Testing, and add a build flag that makes it easy to build cross-compilation toolchains, by disabling the cross-compilation of all host tools and macros for listed
--cross-compile-hosts
, leaving only the Swift runtime libraries in a cross-compilation SDK.Scope: Build changes that either only affect Android or have to be explicitly enabled with a new
build-script
flagIssue: #80788
Original PR: #81596, single supporting change from #81386, #83260, #83422, #83629
Risk: Very low, only affects Android
Testing: Passed CI and we're using these patches in preliminary builds of an official Android CI job, which uses these changes to pass the full compiler validation suite and produce an Android SDK bundle
Reviewer: @edymtt
The Swift core team tasked the Swift on Android workgroup with putting together an official 6.2 Android CI job, so @marcprux and I have been piecing together a pull for that, swiftlang/swift-docker#467, and these are some of the last trunk patches we had to backport to 6.2.