Skip to content

Pass -Xfrontend -mergeable-symbols for embedded objects #8648

@rauhul

Description

@rauhul

Description

Currently SwiftPM links intermediate swift objects when producing a product in embedded swift. This is not correct, and results in linker errors about multiple definitions. Changing SwiftPM to not pass multiple objects is not worth doing in SwiftPM's native build system as it will be replaced swift-build, so as a stop-gap solution we should pass -Xfrontend -mergeable-symbols when producing these intermediate swift objects to allow the linker to dedup them.

Expected behavior

No response

Actual behavior

No response

Steps to reproduce

No response

Swift Package Manager version/commit hash

No response

Swift & OS version (output of swift --version && uname -a)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    build systemChanges to interactions with build systemsembeddedSupport for Embedded Swift

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions