Skip to content

Variant dylibs should have unsuffixed install names - #1545

Open
ndrewh wants to merge 2 commits into
swiftlang:mainfrom
ndrewh:variant-install-names
Open

Variant dylibs should have unsuffixed install names#1545
ndrewh wants to merge 2 commits into
swiftlang:mainfrom
ndrewh:variant-install-names

Conversation

@ndrewh

@ndrewh ndrewh commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Variant dylibs (i.e. built using BUILD_VARIANTS) should have the same install name as the original. This (among other things) prevents dyld from ever loading both the variant and the original dylib.

rdar://79156379

EXECUTABLE_PREFIX = "";
EXECUTABLE_SUFFIX = "";
EXECUTABLE_NAME = "$(EXECUTABLE_PREFIX)$(PRODUCT_NAME)$(EXECUTABLE_VARIANT_SUFFIX)$(EXECUTABLE_SUFFIX)";
EXECUTABLE_INSTALL_NAME = "$(EXECUTABLE_PREFIX)$(PRODUCT_NAME)$(EXECUTABLE_SUFFIX)";

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I am open to suggestions for a better name.

@jakepetroules jakepetroules left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This seems right to me. Are frameworks already working correctly today?

jakepetroules
jakepetroules previously approved these changes Jul 24, 2026
@jakepetroules
jakepetroules dismissed their stale review July 24, 2026 22:48

Taking a bit different approach

Variant dylibs (i.e. built using BUILD_VARIANTS) should have the same install
name as the normal variant. This (among other things) prevents dyld from ever loading
both the variant and the original dylib.

rdar://79156379
@ndrewh
ndrewh force-pushed the variant-install-names branch from 5ff60d1 to c37a6a7 Compare July 27, 2026 16:55
@ndrewh

ndrewh commented Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

@swift-ci test

@ndrewh
ndrewh requested a review from jakepetroules July 28, 2026 00:21
Comment thread Sources/SWBUniversalPlatform/Specs/ProductTypes.xcspec Outdated
@ndrewh

ndrewh commented Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

@swift-ci test

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.

3 participants