Skip to content

Link against SwiftJavaStatic instead of SwiftJava#3

Open
colemancda wants to merge 1 commit into
masterfrom
compose-listview-jni-fix
Open

Link against SwiftJavaStatic instead of SwiftJava#3
colemancda wants to merge 1 commit into
masterfrom
compose-listview-jni-fix

Conversation

@colemancda

Copy link
Copy Markdown
Member

Summary

swift-java's own Package.swift declares its SwiftJava product as type: .dynamic, with a target (SwiftJavaRuntimeSupport) that statically depends on that same product's other target (SwiftJava). SwiftPM rejects this graph whenever any other dynamic library product also exists in the resolution — which happens for any app embedding JavaLang into its own single .so. SwiftJavaStatic is the product swift-java itself documents as the correct choice for static-linking consumers.

Test plan

  • Cross-compiled an app depending on JavaLang (transitively via AndroidKit) for aarch64-unknown-linux-android with this change; the duplicate-linkage error is gone.

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.

1 participant