Skip to content

Commit 36a185e

Browse files
committed
rustc: Remove dylib crate type from most rustc crates
Now that procedural macros no longer link transitively to libsyntax, this shouldn't be needed any more! This commit is an experiment in removing all dynamic libraries from rustc except for librustc_driver itself. Let's see how far we can get with that!
1 parent 2cb7cdc commit 36a185e

File tree

37 files changed

+17
-97
lines changed

37 files changed

+17
-97
lines changed

Cargo.lock

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2288,7 +2288,6 @@ name = "rustc_apfloat"
22882288
version = "0.0.0"
22892289
dependencies = [
22902290
"bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
2291-
"rustc_cratesio_shim 0.0.0",
22922291
"smallvec 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)",
22932292
]
22942293

@@ -2371,15 +2370,6 @@ dependencies = [
23712370
"syntax_pos 0.0.0",
23722371
]
23732372

2374-
[[package]]
2375-
name = "rustc_cratesio_shim"
2376-
version = "0.0.0"
2377-
dependencies = [
2378-
"bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
2379-
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
2380-
"unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
2381-
]
2382-
23832373
[[package]]
23842374
name = "rustc_data_structures"
23852375
version = "0.0.0"
@@ -2392,7 +2382,6 @@ dependencies = [
23922382
"rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
23932383
"rustc-rayon 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
23942384
"rustc-rayon-core 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
2395-
"rustc_cratesio_shim 0.0.0",
23962385
"serialize 0.0.0",
23972386
"smallvec 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)",
23982387
"stable_deref_trait 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2439,7 +2428,6 @@ version = "0.0.0"
24392428
dependencies = [
24402429
"atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
24412430
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
2442-
"rustc_cratesio_shim 0.0.0",
24432431
"rustc_data_structures 0.0.0",
24442432
"serialize 0.0.0",
24452433
"syntax_pos 0.0.0",
@@ -2626,7 +2614,6 @@ version = "0.0.0"
26262614
dependencies = [
26272615
"bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
26282616
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
2629-
"rustc_cratesio_shim 0.0.0",
26302617
"rustc_data_structures 0.0.0",
26312618
"serialize 0.0.0",
26322619
]

src/libarena/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ version = "0.0.0"
66
[lib]
77
name = "arena"
88
path = "lib.rs"
9-
crate-type = ["dylib"]
109

1110
[dependencies]
12-
rustc_data_structures = { path = "../librustc_data_structures" }
11+
rustc_data_structures = { path = "../librustc_data_structures" }

src/libfmt_macros/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,3 @@ version = "0.0.0"
66
[lib]
77
name = "fmt_macros"
88
path = "lib.rs"
9-
crate-type = ["dylib"]

src/libgraphviz/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,3 @@ version = "0.0.0"
66
[lib]
77
name = "graphviz"
88
path = "lib.rs"
9-
crate-type = ["dylib"]

src/librustc/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ version = "0.0.0"
66
[lib]
77
name = "rustc"
88
path = "lib.rs"
9-
crate-type = ["dylib"]
9+
doctest = false
1010

1111
[dependencies]
1212
arena = { path = "../libarena" }

src/librustc_allocator/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ version = "0.0.0"
55

66
[lib]
77
path = "lib.rs"
8-
crate-type = ["dylib"]
98
test = false
109

1110
[dependencies]

src/librustc_apfloat/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,4 @@ path = "lib.rs"
99

1010
[dependencies]
1111
bitflags = "1.0"
12-
rustc_cratesio_shim = { path = "../librustc_cratesio_shim" }
1312
smallvec = { version = "0.6.7", features = ["union", "may_dangle"] }

src/librustc_apfloat/lib.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@
3737

3838
#![feature(nll)]
3939
#![feature(try_from)]
40-
// See librustc_cratesio_shim/Cargo.toml for a comment explaining this.
41-
#[allow(unused_extern_crates)]
42-
extern crate rustc_cratesio_shim;
4340

4441
#[macro_use]
4542
extern crate bitflags;

src/librustc_borrowck/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ version = "0.0.0"
66
[lib]
77
name = "rustc_borrowck"
88
path = "lib.rs"
9-
crate-type = ["dylib"]
109
test = false
10+
doctest = false
1111

1212
[dependencies]
1313
log = "0.4"
@@ -17,4 +17,4 @@ graphviz = { path = "../libgraphviz" }
1717
rustc = { path = "../librustc" }
1818
rustc_mir = { path = "../librustc_mir" }
1919
rustc_errors = { path = "../librustc_errors" }
20-
rustc_data_structures = { path = "../librustc_data_structures" }
20+
rustc_data_structures = { path = "../librustc_data_structures" }

src/librustc_codegen_llvm/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ extern crate rustc_platform_intrinsics as intrinsics;
4747
extern crate rustc_codegen_utils;
4848
extern crate rustc_codegen_ssa;
4949
extern crate rustc_fs_util;
50+
extern crate rustc_driver;
5051

5152
#[macro_use] extern crate log;
5253
#[macro_use] extern crate syntax;

0 commit comments

Comments
 (0)