Skip to content

Preserve Android deployment target in Swift module filenames - #1534

Open
somiljain2006 wants to merge 1 commit into
swiftlang:mainfrom
somiljain2006:Android-module-issue
Open

Preserve Android deployment target in Swift module filenames#1534
somiljain2006 wants to merge 1 commit into
swiftlang:mainfrom
somiljain2006:Android-module-issue

Conversation

@somiljain2006

@somiljain2006 somiljain2006 commented Jul 10, 2026

Copy link
Copy Markdown

Fixes #1167

Preserve deployment target in Android module filenames. Android module filenames must retain the deployment target because it is part of the target triple used for module lookup. Other platforms continue to use the unversioned triple. Adds a regression test covering Android, Apple, and Linux triples.

@jakepetroules

Copy link
Copy Markdown
Collaborator

Why hasn't this surfaced as an issue so far?

@somiljain2006

Copy link
Copy Markdown
Author

My understanding is that this is a fairly specific code path. The existing behavior is correct on Apple platforms, and the issue only manifests on Android, where the API level is encoded in the target triple used for module lookup. That likely limits the number of users affected.

@jakepetroules

Copy link
Copy Markdown
Collaborator

#1167 was filed some time ago. Are you actually still seeing this issue with nightly?

This change doesn't seem correct, unless someone is actively making changes recently to change the behavior. @finagolfin are you aware of anything that has changed the swiftmodule naming scheme on Android lately?

@finagolfin

Copy link
Copy Markdown
Member

My guess is the linked issue was back when Android support wasn't done yet in this new build system back in March, but ever since Jake and Owen added that support in the next month, I have not seen a single issue related to Android versioning, and we now have several repos building with versioned target triples for Android.

I suggest that these users try the latest 6.4 snapshot and report any issues they see with some detailed build output. I did just make a change in trunk today, swiftlang/swift#90650, but that shouldn't affect anyone and these reports long predate that anyway.

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.

SPM Build for Android fails with --build-system swiftbuild: module not found due to target triple mismatch

3 participants