Skip to content

Multiple Swift targets, single dynamic library #715

@mortenbekditlevsen

Description

@mortenbekditlevsen

I am not certain about whether this is an actual issue, or perhaps just my expectations being wrong:

I have two targets in Swift, TargetA and TargetB. TargetA depends on TargetB.
I have a dynamic library product that builds a single dynamic library based on TargetA. I have called that library product 'TargetA' so that the correct library is loaded at runtime.

My first issue is:
The generated java code contains
static final String LIB_NAME = "TargetA";
and
static final String LIB_NAME = "TargetB";
for types in the two targets respectively.

For types in TargetB, I would also like the library name to be 'TargetA', so they both load from the same dynamic library.

I have tried setting

  "nativeLibraryName": "TargetA",

in the swift-java.config files without effect.

Am I supposed to be able to override the LIB_NAME in the generated java code?

The second issue is: <moved to https://github.com/swiftlang/swift-java/issues/746> -- please let's keep one question per one issue. (ktoso)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions