-
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
Do not lose or reorder user-provided linker arguments #70665
Conversation
r? @cramertj (rust_highfive has picked a reviewer for you, use r? to override) |
It seems like we always keep the passed options precisely in In this PR it would be more convenient to normalize to |
With #70729 this rule is no longer true, so I think I'll convert |
☔ The latest upstream changes (presumably #69718) made this pull request unmergeable. Please resolve the merge conflicts. |
Updated. |
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.
r=me once we also have a test verifying sanity of handling of pre-link-arg(s), and maybe possibly some combination of pre-link-arg(s)
and link-arg(s)
?
If you don’t think one is necessary, that is also fine, in that case feel free to just r=me
this.
@bors r=nagisa |
📌 Commit 13bd25e has been approved by |
🌲 The tree is currently closed for pull requests below priority 1000, this pull request will be tested once the tree is reopened |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
Rollup of 7 pull requests Successful merges: - rust-lang#70553 (move OS constants to platform crate) - rust-lang#70665 (Do not lose or reorder user-provided linker arguments) - rust-lang#70750 (Match options directly in the Fuse implementation) - rust-lang#70782 (Stop importing the float modules in documentation) - rust-lang#70798 ("cannot resolve" → "cannot satisfy") - rust-lang#70808 (Simplify dtor registration for HermitCore by using a list of destructors) - rust-lang#70824 (Remove marker comments in libstd/lib.rs macro imports) Failed merges: r? @ghost
Enable msvc for link-args-order I could not see any reason in rust-lang#70665 why this test needs to specifically use `ld`. Maybe to provide a consistent linker input line? In any case, the test does work for the MSVC linker. try-job: i686-msvc try-job: x86_64-msvc
…youxu Enable msvc for link-args-order I could not see any reason in rust-lang#70665 why this test needs to specifically use `ld`. Maybe to provide a consistent linker input line? In any case, the test does work for the MSVC linker. try-job: i686-msvc try-job: x86_64-msvc
…youxu Enable msvc for link-args-order I could not see any reason in rust-lang#70665 why this test needs to specifically use `ld`. Maybe to provide a consistent linker input line? In any case, the test does work for the MSVC linker. try-job: i686-msvc try-job: x86_64-msvc
…youxu Enable msvc for link-args-order I could not see any reason in rust-lang#70665 why this test needs to specifically use `ld`. Maybe to provide a consistent linker input line? In any case, the test does work for the MSVC linker. try-job: i686-msvc try-job: x86_64-msvc
…youxu Enable msvc for link-args-order I could not see any reason in rust-lang#70665 why this test needs to specifically use `ld`. Maybe to provide a consistent linker input line? In any case, the test does work for the MSVC linker. try-job: i686-msvc try-job: x86_64-msvc
…youxu Enable msvc for link-args-order I could not see any reason in rust-lang#70665 why this test needs to specifically use `ld`. Maybe to provide a consistent linker input line? In any case, the test does work for the MSVC linker. try-job: i686-msvc try-job: x86_64-msvc
Rollup merge of rust-lang#128647 - ChrisDenton:link-args-order, r=jieyouxu Enable msvc for link-args-order I could not see any reason in rust-lang#70665 why this test needs to specifically use `ld`. Maybe to provide a consistent linker input line? In any case, the test does work for the MSVC linker. try-job: i686-msvc try-job: x86_64-msvc
Linker arguments are potentially order-dependent, so the order in which
-C link-arg
and-C link-args
options are passed torustc
should be preserved when they are passed further to the linker.Also, multiple
-C link-args
options are now appended to each other rather than overwrite each other.In other words,
-C link-arg=a -C link-args="b c" -C link-args="d e" -C link-arg=f
is now passed as"a" "b" "c" "d" "e" "f"
and not as"d" "e" "a" "f"
.Addresses #70505 (comment).