-
Notifications
You must be signed in to change notification settings - Fork 304
[build-script-helper] Add support for Android cross-compilation #424
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
@swift-ci please test |
Add new flags '--cross-compile-host' and '--cross-compile-config' and use them to cross-compile, gated only for Android for now. Add a '--prefix' flag to install to a cross-compiled toolchain instead and set 'SWIFT_EXEC' when using SPM, so it uses the right Swift toolchain.
install(bin_path, args.toolchain) | ||
|
||
if not args.install_prefixes: | ||
args.install_prefixes = [args.toolchain] |
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.
I had tested this default case like this initially, then modified it to just passing args.install_prefixes if not None else [args.toolchain]
to the line below and not tested the default case again. For whatever reason, that doesn't work, so going back to this.
Ping, just needs another CI run. |
@swift-ci please test |
This can be merged, as it doesn't depend on any other pull. |
Add new flags
--cross-compile-host
and--cross-compile-config
and use them to cross-compile, gated only for Android for now. Add a--prefix
flag to install to a cross-compiled toolchain instead and setSWIFT_EXEC
when using SPM, so it uses the right Swift toolchain.Along with swiftlang/swift#36917 and an updated version of this
build-script
patch to pass the right flags in, I have a working sourcekit-lsp running on Android now, after cross-compiling it from linux for the first time. I will submit that second linked patch once this is in.