Skip to content

Use weak linkage for EII defaults#157311

Open
jdonszelmann wants to merge 1 commit into
rust-lang:mainfrom
jdonszelmann:weak-linkage-eii
Open

Use weak linkage for EII defaults#157311
jdonszelmann wants to merge 1 commit into
rust-lang:mainfrom
jdonszelmann:weak-linkage-eii

Conversation

@jdonszelmann
Copy link
Copy Markdown
Contributor

hard to find a test for this, but weak seems more correct (after private discussion with @bjorn3)

Also changes a log statement to make it a lil easier to see what's going on.

r? @bjorn3

@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jun 2, 2026
@bjorn3
Copy link
Copy Markdown
Member

bjorn3 commented Jun 2, 2026

To repeat what I said in private, the LLVM docs seem to suggest that linkonce allows discarding definitions if they aren't referenced in the same object file, but there doesn't currently seem to be any place that distinguishes linkonce and weak in LLVM other than spirv that I could find.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants