Skip to content

Codegen backend interface refactor #77795

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 7 commits into from
Oct 14, 2020

Conversation

bjorn3
Copy link
Member

@bjorn3 bjorn3 commented Oct 10, 2020

This moves several things away from the codegen backend to rustc_interface. There are a few behavioral changes where previously the incremental cache (incorrectly) wouldn't get finalized, but now it does. See the individual commit messages.

bjorn3 added 5 commits October 9, 2020 19:35
This causes it to be called even when passing `-Zno-link`, when linking
fails or when neither `--emit link` nor `--emit metadata` is used.
This also moves the -Zno-link implementation to rustc_interface
This makes it also run when compilation has failed, neither --emit exe
nor --emit metadata is passed, or -Zno-link is used.
@rust-highfive
Copy link
Contributor

r? @oli-obk

(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 Oct 10, 2020
@jyn514 jyn514 added A-codegen Area: Code generation C-cleanup Category: PRs that clean code up or issues documenting cleanup. labels Oct 10, 2020
@bjorn3
Copy link
Member Author

bjorn3 commented Oct 10, 2020

As always I forgot to update the hotplug_codegen_backend test.

@bjorn3 bjorn3 force-pushed the codegen_backend_interface_refactor branch from 3d78eb5 to a81d84f Compare October 10, 2020 16:29
@bjorn3 bjorn3 force-pushed the codegen_backend_interface_refactor branch from a81d84f to aa51449 Compare October 10, 2020 17:01
@oli-obk
Copy link
Contributor

oli-obk commented Oct 12, 2020

@bors r+

@bors
Copy link
Collaborator

bors commented Oct 12, 2020

📌 Commit 477d823bbfca31da4dd0ec79363d559b16322aad has been approved by oli-obk

@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 Oct 12, 2020
@bjorn3 bjorn3 force-pushed the codegen_backend_interface_refactor branch from 477d823 to b620e49 Compare October 12, 2020 14:22
@oli-obk
Copy link
Contributor

oli-obk commented Oct 12, 2020

@bors r+

@bors
Copy link
Collaborator

bors commented Oct 12, 2020

📌 Commit b620e49 has been approved by oli-obk

@bjorn3 bjorn3 mentioned this pull request Oct 12, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Oct 13, 2020
…factor, r=oli-obk

Codegen backend interface refactor

This moves several things away from the codegen backend to rustc_interface. There are a few behavioral changes where previously the incremental cache (incorrectly) wouldn't get finalized, but now it does. See the individual commit messages.
This was referenced Oct 13, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 14, 2020
Rollup of 8 pull requests

Successful merges:

 - rust-lang#77765 (Add LLVM flags to limit DWARF version to 2 on BSD)
 - rust-lang#77788 (BTreeMap: fix gdb provider on BTreeMap with ZST keys or values)
 - rust-lang#77795 (Codegen backend interface refactor)
 - rust-lang#77808 (Moved the main `impl` for FnCtxt to its own file.)
 - rust-lang#77817 (Switch rustdoc from `clean::Stability` to `rustc_attr::Stability`)
 - rust-lang#77829 (bootstrap: only use compiler-builtins-c if they exist)
 - rust-lang#77870 (Use intra-doc links for links to module-level docs)
 - rust-lang#77897 (Move `Strip` into a separate rustdoc pass)

Failed merges:

 - rust-lang#77879 (Provide better documentation and help messages for x.py setup)
 - rust-lang#77902 (Include aarch64-pc-windows-msvc in the dist manifests)

r? `@ghost`
@bors bors merged commit 17ee28b into rust-lang:master Oct 14, 2020
@rustbot rustbot added this to the 1.49.0 milestone Oct 14, 2020
@bjorn3 bjorn3 deleted the codegen_backend_interface_refactor branch October 14, 2020 10:15
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Dec 28, 2020
…n_backend, r=oli-obk

Move some more code out of CodegenBackend::{codegen_crate,link}

Kind of a follow up to rust-lang#77795
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Dec 28, 2020
…n_backend, r=oli-obk

Move some more code out of CodegenBackend::{codegen_crate,link}

Kind of a follow up to rust-lang#77795
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-codegen Area: Code generation C-cleanup Category: PRs that clean code up or issues documenting cleanup. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants