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

Thin out rustc_codegen_llvm dependencies. #47849

Closed
eddyb opened this issue Jan 29, 2018 · 4 comments
Closed

Thin out rustc_codegen_llvm dependencies. #47849

eddyb opened this issue Jan 29, 2018 · 4 comments
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@eddyb
Copy link
Member

eddyb commented Jan 29, 2018

I'm working on rustc_mir and rustc_codegen_llvm gets rebuilt even though it barely uses anything.
cc @oli-obk @michaelwoerister Can we do this long-term given #46882 and any other plans?

@eddyb eddyb added C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jan 29, 2018
@oli-obk
Copy link
Contributor

oli-obk commented Jan 29, 2018

should be possible...

things left to do after #46882

  • rustc_mir::interpret::{read_target_uint, const_val_field};
  • rustc_mir::monomorphize
    • Instance
    • resolve_drop_in_place
    • resolve_closure
    • item::*

@eddyb eddyb changed the title Thin out rustc_trans dependencies. Thin out rustc_codegen_llvm dependencies. Nov 4, 2018
bors added a commit that referenced this issue Jun 3, 2019
Remove _all_ codegen dependencies on `rustc_mir` 🎉

~This code is pretty self-contained. It has no references to the rest of `rustc_mir`. Moving it to its own crate means that almost all of the references from `rustc_codegen_*` to `rustc_mir` are instead moved to `rustc_monomorphize`, which should help improve compile times for the compiler a bit...~

With the help of eddyb and oli-obk, all of the dependencies of `librustc_codegen_*` on `librustc_mir` have been removed:
- dependencies on `rustc_mir::monomorphize` were moved to `rustc::mir::mono`
- `rustc_mir::const_eval::const_field` is made into a query.
- `rustc_mir::interpret::type_name` is made into a query.

This should help reduce compile time when working on `rustc_mir` 🕐

cc #47849

r? @eddyb
@mati865
Copy link
Contributor

mati865 commented Jun 21, 2019

Is it small enough?

[dependencies]
cc = "1.0.1" # Used to locate MSVC
num_cpus = "1.0"
rustc-demangle = "0.1.15"
rustc_llvm = { path = "../librustc_llvm" }
memmap = "0.6"

@Mark-Simulacrum
Copy link
Member

Cargo.toml is not the source of truth anymore -- sysroot dependencies will become relevant after #61727, and those aren't listed in any one place. A number of crates are currently being pulled from the sysroot.

@eddyb
Copy link
Member Author

eddyb commented Jun 23, 2019

This has been solved by #61062. #61727 will have more accurate tracking, but the dependencies are gone.

@eddyb eddyb closed this as completed Jun 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants