Skip to content
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

linker: Preserve relative order of -l options, including dynamic libs #104406

Closed
wants to merge 1 commit into from

Conversation

petrochenkov
Copy link
Contributor

@petrochenkov petrochenkov commented Nov 14, 2022

Dynamic native libraries pulled through dependency crates are no longer linked last, they are now linked immediately after their corresponding crates, like other libraries.

The change is a part of RFC 2951 "Linking modifiers for native libraries" (https://github.com/rust-lang/rfcs/blob/master/text/2951-native-link-modifiers.md#relative-order-of--l-and--clink-args-options, #99427).

Crater run with this change found some regressions, their analysis can be found in #102832 (comment).
There are 3 root regressions, in all cases crates depend on some native libraries, but do not declare that dependency.

This is a continuation of #103311 and the second part of #102832.
r? @bjorn3

TODO:

Dynamic libraries pulled through dependency crates are no longer linked last, they are now linked immediately after their corresponding crates, like other libraries
@rustbot rustbot added 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 Nov 14, 2022
@bjorn3
Copy link
Member

bjorn3 commented Nov 14, 2022

I think this change itself looks good. I'm not comfortable approving it though as it is a breaking change.

@petrochenkov petrochenkov added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 14, 2022
@JohnCSimon
Copy link
Member

@petrochenkov Can you please post your status on this PR? It has sat idle for months.

@petrochenkov
Copy link
Contributor Author

I need to analyze the regressions in lapacke-sys in more detail.

@petrochenkov
Copy link
Contributor Author

I'll continue this work when I have time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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.

4 participants