Skip to content

Fix portable Swift runtime linking in UIKit klibs - #3274

Open
Vendula Švastalová (svastven) wants to merge 3 commits into
jb-mainfrom
svastven/ui-uikit-gradle-fix
Open

Vendula Švastalová (svastven) wants to merge 3 commits into
jb-mainfrom
svastven/ui-uikit-gradle-fix

Conversation

@svastven

@svastven Vendula Švastalová (svastven) commented Jul 29, 2026

Copy link
Copy Markdown

Avoid publishing Xcode path in the UIKit swiftUtils KLib metadata.
The Swift runtime library names remain portable linker requirements in swiftUtils.def. And the active Xcode toolchain's Swift compatibility library directory is resolved lazily at final iOS link time.

Fixes CMP-10607 Resolve Swift compatibility libraries from the consumer’s active Xcode during iOS linking

Release Notes

N/A

}
}

private fun KotlinNativeTarget.configureSwiftCompatibilityLinking() {

@hub-bla Hubert Błaszczyk (hub-bla) Aug 28, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a comment that explain the purpose of it?

My understanding so far is that Kotlin/Native doesn't know about this folder when linking. Because of that we are forced to create this logic not only in cmp-core but also inside our compose plugin.

Ideally, Kotlin/Native could take care of this automatically, since it already resolves the path to the linker from the toolchain.

https://youtrack.jetbrains.com/issue/KT-69793 seems related. Maybe we can ask the Kotlin/Native team to add it?

@terrakok Konstantin (terrakok) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From a gradle code perspective the PR seems good. Regarding linker flags I don't have a proper knowledge

@saitanallensantiago26-beep

This comment was marked as spam.

2 similar comments
@saitanallensantiago26-beep

This comment was marked as spam.

@saitanallensantiago26-beep

This comment was marked as spam.

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.

4 participants