Skip to content

Conversation

DougGregor
Copy link
Member

As with SIL functions, track the parent module where a SIL global variable was originally defined so that we can determine whether we are outside of its original module for linkage purposes. Use this to make sure we emit via a weak definition when emitting to a module other than the originating module.

With this fix in place, we no longer need -mergeable-symbols, because the default model uses weak definitions for imported entities consistently.

Fixes rdar://160153163 & rdar://158364032.

…ization

As with SIL functions, track the parent module where a SIL global
variable was originally defined so that we can determine whether we
are outside of its original module for linkage purposes. Use this to
make sure we emit via a weak definition when emitting to a module
other than the originating module.

Fixes rdar://160153163.
This option is no longer necessary, because we emit weak definitions
for any imported modules. Fixes rdar://158364032.
@DougGregor DougGregor force-pushed the remove-mergeable-symbols branch from b7aaa82 to 66a730b Compare September 9, 2025 00:44
@DougGregor
Copy link
Member Author

@swift-ci please smoke test

@DougGregor DougGregor merged commit e83403c into swiftlang:main Sep 9, 2025
3 checks passed
@DougGregor DougGregor deleted the remove-mergeable-symbols branch September 9, 2025 14:09
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