Skip to content

Conversation

@nbdd0121
Copy link
Member

@nbdd0121 nbdd0121 commented Dec 29, 2025

Tracking issue of the feature: #127488

DSO local attributes are not correctly applied to extern statics with #[linkage = "foo"] as we generate an internal global for such statics, and the we evaluate (and apply) DSO attributes on the internal one instead.

Fix this by applying DSO local attributes on the actually extern ones, too.

This test currently doesn't fulfill its purpose, as `external dso_local`
can still match `external {{.*}}`. Fix this by using CHECK-NOT directives.

Also, this test is expanded to all platforms where it makes sense, instead
of restricting to loongarch.
The current code applies `dso_local` to the internal generated symbols
instead of the actually-externally one.
@rustbot rustbot added 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 Dec 29, 2025
@rustbot
Copy link
Collaborator

rustbot commented Dec 29, 2025

r? @jdonszelmann

rustbot has assigned @jdonszelmann.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@nbdd0121 nbdd0121 changed the title Fix and expand direct-access-external-data test Fix dso_local for external statics with linkage Dec 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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