-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[build][android] Use a CMake toolchain file to cross-compile Testing #83260
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
Conversation
@@ -154,12 +154,15 @@ def uses_host_tests(self): | |||
""" | |||
return True | |||
|
|||
def swift_flags(self, args): | |||
def swift_flags(self, args, resource_path=None): |
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.
This method is currently used to generate Swift cross-compilation flags for build-script-impl
products alone, but I was able to reuse it for Testing
by passing in a separate resource_path
. That resource_path
calculation can only be done externally, where the particular build product is known.
@swift-ci test |
This looks great and is useful for cross compilation in general! |
@swift-ci smoke test |
Updated to refactor a bit and disable a recently failing but unrelated test on 32-bit Android. |
@swift-ci smoke test macos |
Ping @etcwilde, any feedback on this small Android-only pull? I'd like to get it into 6.2 next, works well on my CI. |
Updated to enable a test that now passes and rebased. @swift-ci smoke test |
@MaxDesiatov, you've also modified this code, perhaps you can review? |
Also, disable a recently failing test for Android armv7 and enable another one that now passes.
Added a validation test, made sure it worked on linux, and rebased. @swift-ci smoke test |
Going ahead and merging because this only affects Android, passed the CI, and I want to get it into 6.2 next. If anyone finally reviews it and wants anything changed, I can always do that later. |
@gottesmm and @etcwilde, I believe you two are most familiar with this
build-script
feature, let me know what you think. I reused the linux toolchain file generation for Android, as they have a lot in common, but can separate the two if wanted. This pull was tested by cross-compiling on my Android CI, and natively on Android in the Termux app.I will look at cross-compiling Foundation dependencies like libcurl with this new Android toolchain file in a subsequent pull.