Skip to content

Don't build the embedded stdlib or copy the trunk SwiftBridging header on Android CI#569

Merged
shahmishal merged 2 commits into
swiftlang:mainfrom
finagolfin:droid
Jun 16, 2026
Merged

Don't build the embedded stdlib or copy the trunk SwiftBridging header on Android CI#569
shahmishal merged 2 commits into
swiftlang:mainfrom
finagolfin:droid

Conversation

@finagolfin

Copy link
Copy Markdown
Member

The Android CI is broken right now only because we're building the embedded stdlib unnecessarily, and that is currently broken on most linux toolchain CI, swiftlang/swift#89753. Disable it as we just throw out the results anyway.

Let me test this locally and it should be ready to go.

@finagolfin finagolfin marked this pull request as draft June 9, 2026 05:34
@DougGregor

Copy link
Copy Markdown
Member

I think swiftlang/swift#89753 will unbreak the CI. My other PR doesn't have this fix.

@finagolfin

Copy link
Copy Markdown
Member Author

I didn't even really notice we're building embedded till now, so it was pretty stable, 👍 just a waste to keep building it and then throwing it out. If we ever ship an embedded subset for Android, we'll enable this again.

@finagolfin finagolfin marked this pull request as ready for review June 9, 2026 11:48
@finagolfin

Copy link
Copy Markdown
Member Author

Alright, worked fine locally, ready for review.

@finagolfin finagolfin changed the title Don't build the embedded stdlib on Android CI Don't build the embedded stdlib or copy the SwiftBridging header on Android CI Jun 12, 2026
@finagolfin

Copy link
Copy Markdown
Member Author

Added another commit to fix a CI failure when bundling, ready to go in, @justice-adams-apple.

@finagolfin finagolfin changed the title Don't build the embedded stdlib or copy the SwiftBridging header on Android CI Don't build the embedded stdlib or copy the trunk SwiftBridging header on Android CI Jun 12, 2026
@finagolfin

Copy link
Copy Markdown
Member Author

Updated the bridging fix so it should only affect trunk, where this header was moved, swiftlang/swift#88748.

@finagolfin

Copy link
Copy Markdown
Member Author

@shahmishal, this will fix the Android CI, ready to go.

@finagolfin

Copy link
Copy Markdown
Member Author

Noticed that this would likely still break for the less commonly-run trunk PR CI, so updated with a fix for that too.

@DougGregor

Copy link
Copy Markdown
Member

I want to poke at the "why?" here a little more. Embedded can be useful even for non-embedded targets because it doesn't require a runtime underneath, so you get independent binaries with smaller code size. I think Android users can benefit from that as well.

@finagolfin

Copy link
Copy Markdown
Member Author

Sure, the problem is that nobody that I know of has gotten the Embedded subset compiled for Android, so the flag that would enable it is disabled by default and isn't wired up to build for Android anyway. However, since this --build-embedded-stdlib flag is enabled by default, we unnecessarily build the Embedded subset for linux/glibc alone on the Android CI, only to throw it out when creating the final Android bundle. All this pull does is stop wasting time building that linux/glibc Embedded stdlib on the Android CI.

As for getting the Embedded subset for Android going, there was broad agreement that it would be useful when the @swiftlang/android-workgroup discussed it a couple times last year, but nobody has stepped up to build it, or seemingly even tried to, as nobody brought it up this year.

I think we all agree that we'd like to have it, but nobody has stepped up to provide it, while this pull has no effect on Embedded Android.

@finagolfin

Copy link
Copy Markdown
Member Author

In case it is unclear what I'm talking about, take a look at the failing build command in my first link in the OP, where the Embedded stdlib for linux-gnu was failing. We never built the Embedded stdlib for Android on the Android CI, so this pull simply disables building that linux-gnu Embedded stdlib alone.

@shahmishal

Copy link
Copy Markdown
Member

Going to merge this to unblock Android CI.

@shahmishal shahmishal merged commit 406d627 into swiftlang:main Jun 16, 2026
1 check passed
@finagolfin finagolfin deleted the droid branch June 16, 2026 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants