Skip to content

Codegen backend interface refactor - #77795

Merged
bors merged 7 commits into
rust-lang:masterfrom
bjorn3:codegen_backend_interface_refactor
Oct 14, 2020
Merged

Codegen backend interface refactor#77795
bors merged 7 commits into
rust-lang:masterfrom
bjorn3:codegen_backend_interface_refactor

Conversation

@bjorn3

Copy link
Copy Markdown
Member

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 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
Copy Markdown
Contributor

r? @oli-obk

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

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 10, 2020
@jyn514jyn514 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
Copy Markdown
MemberAuthor

As always I forgot to update the hotplug_codegen_backend test.

@bjorn3
bjorn3force-pushed the codegen_backend_interface_refactor branch from 3d78eb5 to a81d84fCompareOctober 10, 2020 16:29
@bjorn3
bjorn3force-pushed the codegen_backend_interface_refactor branch from a81d84f to aa51449CompareOctober 10, 2020 17:01
Comment threadcompiler/rustc_interface/src/queries.rs
@oli-obk

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented Oct 12, 2020

Copy link
Copy Markdown
Collaborator

📌 Commit 477d823bbfca31da4dd0ec79363d559b16322aad has been approved by oli-obk

@borsbors 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
bjorn3force-pushed the codegen_backend_interface_refactor branch from 477d823 to b620e49CompareOctober 12, 2020 14:22
@oli-obk

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented Oct 12, 2020

Copy link
Copy Markdown
Collaborator

📌 Commit b620e49 has been approved by oli-obk

@bjorn3bjorn3 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:masterOct 14, 2020
@rustbotrustbot 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
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-codegenArea: Code generationC-cleanupCategory: PRs that clean code up or issues documenting cleanup.S-waiting-on-borsStatus: 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

@bjorn3@rust-highfive@oli-obk@bors@jyn514@rustbot