-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
[5.4][android] Move to the NDK's unified sysroot #35820
Conversation
Since the NDK removes the platforms/ and sysroot/ directories in the latest NDK 22, switch to the unified sysroot in toolchains/llvm/ and take advantage of a bunch of simplification that's now possible.
@swift-ci test |
Windows CI failure appears spurious, probably just needs to be re-run:
|
@swift-ci test Windows |
cc: @compnerd |
@drodriguez, since you merged this into trunk, put you down here as reviewer too. I think if you approve, this is ready to merge into this branch too. |
Sorry, I didn't understand I had to say something. This is OK to be merged. The scope is pretty limited to Android. This will allow the 5.4 branch to be more future-proof by allowing using more newer Android NDK if necessary. |
seems okay given this is a cherry-pick of #34491 |
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 think its safe enough, and is scoped specifically to android.
message(SEND_ERROR "Couldn't find LIBC_INCLUDE_DIRECTORY for Android") | ||
endif() | ||
swift_android_sysroot(android_sysroot) | ||
set(SWIFT_SDK_ANDROID_ARCH_${arch}_PATH "${android_sysroot}") |
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.
Using _SYSROOT
instead of _PATH
would be less confusing IMO.
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.
Maybe, but this is the variable name chosen by Swift for the sysroot for all OS/ARCH combos, as can be seen earlier in this file and used elsewhere in the same generic way. If you'd like, maybe that could be changed in a later pull for all OS's.
Ping, do one of the Swift 5.4 branch managers need to sign off on this? This is ready to go in. |
Thanks, that's the largest patch I apply to the 5.4 branch when building it for Android, ten more to get into trunk (some of those are already in and others are specific to that app). |
Since the NDK removes the platforms/ and sysroot/ directories in the latest NDK 22, switch to the unified sysroot in toolchains/llvm/ and take advantage of a bunch of simplification that's now possible.
This is a cherry-pick of #34491 from trunk, only modifying the
build-script-impl
change slightly because of different source indentation than trunk and removing the single C++ Interop test change (that means that test will fail on this branch when tried for Android, but nobody is really running those tests for Android with the release branch).It is needed because the latest Android NDK 22 finally deprecated the old organization of the Android cross-compilation sysroot, so the 5.4 releases won't build with NDK 22 and future NDKs without this pull.
Only affects building for Android, except for one Driver test change, which was approved by its author.
None
Essentially none, as everything is scoped to Android only, except for the single, simple Driver test change.
I've run the tests natively on Android from the Jan. 11 source snapshot of this 5.4 branch with this pull applied, no problem.
@drodriguez