-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
native lib: defer the duplicate check after relevant_lib check. #85554
Conversation
r? @varkor (rust-highfive has picked a reviewer for you, use r? to override) |
I don't know how I missed this, I remember specifically considering this case. |
let name = match lib.name { | ||
Some(l) => l, | ||
None => continue, | ||
}; | ||
|
||
// Skip if this library is the same as the last. | ||
last = if (lib.kind, lib.name) == last { continue } else { (lib.kind, lib.name) }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is not strictly necessary for the fix, but let's leave it for consistency.
It also improves deduplication in the (unlikely) case of #[link(name = "foo")] #[link(wasm_import_module = "...")] #[link(name = "foo")]
.
Could you add a test for this? |
@rustbot label -S-waiting-on-author +S-waiting-on-review |
@bors r+ |
📌 Commit 8e42fa5 has been approved by |
☀️ Test successful - checks-actions |
#84794 break code using conditional-compilation with
#[link]
attributes.