Skip to content

Commit

Permalink
Use sysroot crates maximally in rustc_codegen_gcc.
Browse files Browse the repository at this point in the history
This shrinks `compiler/rustc_codegen_gcc/Cargo.lock` quite a bit. The
only remaining dependencies in `compiler/rustc_codegen_gcc/Cargo.lock`
are `gccjit`, `lang_tester`, and `boml`, all of which aren't used in any
other compiler crates.

The commit also reorders and adds comments to the `extern crate` items
so they match those in miri.
  • Loading branch information
nnethercote committed Sep 2, 2024
1 parent f1d136b commit 37c29b8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 188 deletions.
176 changes: 0 additions & 176 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 0 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,11 @@ default = ["master"]

[dependencies]
gccjit = "2.1"

# Local copy.
#gccjit = { path = "../gccjit.rs" }

object = { version = "0.30.1", default-features = false, features = [
"std",
"read",
] }
smallvec = { version = "1.6.1", features = ["union", "may_dangle"] }
# TODO(antoyo): make tempfile optional.
tempfile = "3.7.1"

[dev-dependencies]
lang_tester = "0.8.0"
tempfile = "3.1.0"
boml = "0.3.1"

[profile.dev]
Expand Down
10 changes: 8 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@
#![deny(clippy::pattern_type_mismatch)]
#![allow(clippy::needless_lifetimes)]

// Some "regular" crates we want to share with rustc
extern crate object;
extern crate smallvec;
extern crate tempfile;
#[macro_use]
extern crate tracing;

// The rustc crates we need
extern crate rustc_apfloat;
extern crate rustc_ast;
extern crate rustc_attr;
Expand All @@ -42,8 +50,6 @@ extern crate rustc_middle;
extern crate rustc_session;
extern crate rustc_span;
extern crate rustc_target;
#[macro_use]
extern crate tracing;

// This prevents duplicating functions and statics that are already part of the host rustc process.
#[allow(unused_extern_crates)]
Expand Down

0 comments on commit 37c29b8

Please sign in to comment.