Use the new #available(Android <API>, *) instead to look for backtrace()#1546
Use the new #available(Android <API>, *) instead to look for backtrace()#1546finagolfin merged 1 commit intoswiftlang:mainfrom
#available(Android <API>, *) instead to look for backtrace()#1546Conversation
|
Converted to a draft since it's not possible to safely merge it yet. |
bd60401 to
f43b73d
Compare
|
Rebased and changed official workflow version to get an NDK fix, swiftlang/github-workflows#235, so this pull's CI finally uses the NDK 28 it requires and passes. This change requires Android NDK 28 or later, but the Swift SDK for Android is still stuck on LTS NDK 27, which doesn't have the header annotations to support this Android availability feature. I just tried changing the availability condition to I think this would be fixed if we had compile-time NDK versioning, swiftlang/swift#81402, but for now, users will have to choose one NDK or the other and we cannot merge this till all Android CI switch to NDK 28 or later. |
Yeah that's not surprising; the I probably said "don't do this" previously, but to cut the knot: maybe add an |
|
Heh, nice idea but I'd rather not resort to C, will just wait till we update the NDK. 👍 |
|
Rebased and updated the workflow version to build this against the 6.3 release, no problem, with the trunk snapshot failures a known issue for all SDKs- hence the trunk wasm failures too- that we're told will be fixed in the next trunk tag. The plan is to update the trunk Android CI to a newer NDK soon, after which the only question is whether we should try to get this into 6.3 too, which will require updating the 6.3 CI to NDK 28+ also. |
|
Alright, this is finally ready to go, now that both trunk CI that build Android SDKs have been switched to NDK 28c, the minimum NDK version that supports this availability feature, and I made sure this CI only Pinging @swiftlang/android-workgroup and the Testing reviewers for any final review. |
| enable_freebsd_checks: true | ||
| freebsd_swift_versions: '["nightly-main"]' | ||
| freebsd_os_versions: '["14.3"]' | ||
| android_sdk_versions: '["nightly-main"]' |
There was a problem hiding this comment.
Are similar changes required in the other workflow files?
There was a problem hiding this comment.
I see no other workflows in this repo building for Android, is there somewhere else you think we should enable Android also?
There was a problem hiding this comment.
main_using_main and main_using_release should probably be building for Android, but if they're not currently then we can add that in a separate PR.
There was a problem hiding this comment.
I added those and removed this android_sdk_versions restriction, as I believe building with 6.3 will work, provided we only use NDK 28 or above. We just don't want this pull merged back to the release/6.3 branch, which still supports NDK 27.
There was a problem hiding this comment.
Passed all Android CI, as expected. 👍
26f0e0d to
05e9581
Compare
#available(Android <API>, *) instead from Swift 6.3 to look for backtrace()#available(Android <API>, *) instead to look for backtrace()
…race()` Mads added this compiler feature for Android in swiftlang/swift#84574 before the 6.3 branch, so update the Android triples and NDK versions to test it, as it requires NDK 28 or later.
| enable_wasm_sdk_build: true | ||
| wasm_sdk_versions: '["nightly-6.3"]' | ||
| enable_android_sdk_build: true | ||
| android_sdk_versions: '["6.3", "nightly-6.3"]' |
There was a problem hiding this comment.
Would you like me to update all the others to "6.3" also, as the 6.3 snapshots won't be tagged much going forward?
There was a problem hiding this comment.
We can do that in a separate PR.
|
It seems that the BCNY CI started to fail during the Android xctest build after this change. What'd be the best way to fix it? https://github.com/thebrowsercompany/swift-build/actions/runs/24752103243/job/72427215969 |
|
What toolchain version are you using, and what NDK version? |
|
We were using NDK r27 and updating to the NDK r28 seems to resolve the issue. Thank you |
Mads added this compiler feature for Android in swiftlang/swift#84574 before the 6.3 branch, so update the Android triples and NDK version to test it, as it requires NDK 28 or later.
@grynspan, just a pure rebased copy of #1373, unfortunately, may be a while before we can merge it.