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

rustc_codegen_ssa: Refactor construction of linker arguments #70868

Merged
merged 7 commits into from
Apr 9, 2020

Conversation

petrochenkov
Copy link
Contributor

And add comments.

This PR doesn't reorder any linker arguments and therefore shouldn't contain any observable changes.

The next goal here is to

  • Factor out order-independent linker arguments in the compiler code and in target specifications and pass them together. Such arguments generally apply to the whole linking session or the produced linking result rather to individual object files or libraries.
  • Figure out where exactly among the remaining order-dependent arguments we should place customization points like -C link-args and -Z pre-link-args.
  • Possibly provide command line opt-outs for options that are currently passed unconditionally (like CRT objects or arguments defined by the target spec).
  • Document and stabilize the customization points that are not yet stable ([WIP] Stabilize -Z pre-link-arg(s) as -C pre-link-arg(s) #70505).

@rust-highfive
Copy link
Collaborator

r? @davidtwco

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 6, 2020
@petrochenkov petrochenkov added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Apr 6, 2020
@petrochenkov
Copy link
Contributor Author

@mati865 or @nagisa, could you review? This should be a pure refactoring.

Review rights: @bors delegate=mati865

@bors
Copy link
Contributor

bors commented Apr 7, 2020

✌️ @mati865 can now approve this pull request

@davidtwco
Copy link
Member

r? @nagisa

@rust-highfive rust-highfive assigned nagisa and unassigned davidtwco Apr 8, 2020
Copy link
Contributor

@mati865 mati865 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is great from readability perspective. I agree target_filesearch is a step in the right direction.
I'm not member of any Rust team and would prefer if somebody qualified also checked it.

@nagisa
Copy link
Member

nagisa commented Apr 8, 2020

@bors r=nagisa,mati865

@bors
Copy link
Contributor

bors commented Apr 8, 2020

📌 Commit 5a4fa45 has been approved by nagisa,mati865

@bors
Copy link
Contributor

bors commented Apr 8, 2020

🌲 The tree is currently closed for pull requests below priority 1000, this pull request will be tested once the tree is reopened

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 8, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 9, 2020
Rollup of 7 pull requests

Successful merges:

 - rust-lang#67705 (Use unrolled loop for searching NULL in [u16] on Windows)
 - rust-lang#70367 (save/restore `pessimistic_yield` when entering bodies)
 - rust-lang#70822 (Don't lint for self-recursion when the function can diverge)
 - rust-lang#70868 (rustc_codegen_ssa: Refactor construction of linker arguments)
 - rust-lang#70896 (Implement Chain with Option fuses)
 - rust-lang#70916 (Support `#[track_caller]` on functions in `extern "Rust" { ... }`)
 - rust-lang#70918 (rustc_session: forbid lints override regardless of position)

Failed merges:

r? @ghost
@bors bors merged commit cefee7b into rust-lang:master Apr 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

6 participants