Skip to content

Commit 345ba50

Browse files
alexcrichtonZoxc
authored andcommitted
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 b0bd5f2 commit 345ba50

File tree

38 files changed

+18
-84
lines changed

38 files changed

+18
-84
lines changed

src/libarena/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ edition = "2018"
77
[lib]
88
name = "arena"
99
path = "lib.rs"
10-
crate-type = ["dylib"]
1110

1211
[dependencies]
1312
rustc_data_structures = { path = "../librustc_data_structures" }

src/libfmt_macros/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ crate-type = ["dylib"]
1111

1212
[dependencies]
1313
syntax_pos = { path = "../libsyntax_pos" }
14+

src/libgraphviz/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,3 @@ edition = "2018"
77
[lib]
88
name = "graphviz"
99
path = "lib.rs"
10-
crate-type = ["dylib"]

src/librustc/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ edition = "2018"
77
[lib]
88
name = "rustc"
99
path = "lib.rs"
10-
crate-type = ["dylib"]
10+
doctest = false
1111

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

src/librustc/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
#![feature(extern_types)]
4747
#![feature(nll)]
4848
#![feature(non_exhaustive)]
49-
#![feature(proc_macro_internals)]
5049
#![feature(optin_builtin_traits)]
5150
#![feature(range_is_empty)]
5251
#![feature(rustc_diagnostic_macros)]

src/librustc_allocator/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ edition = "2018"
66

77
[lib]
88
path = "lib.rs"
9-
crate-type = ["dylib"]
109
test = false
1110

1211
[dependencies]

src/librustc_apfloat/Cargo.toml

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

1111
[dependencies]
1212
bitflags = "1.0"
13-
rustc_cratesio_shim = { path = "../librustc_cratesio_shim" }
1413
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
@@ -35,9 +35,6 @@
3535
#![deny(rust_2018_idioms)]
3636

3737
#![feature(nll)]
38-
// See librustc_cratesio_shim/Cargo.toml for a comment explaining this.
39-
#[allow(unused_extern_crates)]
40-
extern crate rustc_cratesio_shim;
4138

4239
use std::cmp::Ordering;
4340
use std::fmt;

src/librustc_borrowck/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ edition = "2018"
77
[lib]
88
name = "rustc_borrowck"
99
path = "lib.rs"
10-
crate-type = ["dylib"]
1110
test = false
11+
doctest = false
1212

1313
[dependencies]
1414
log = "0.4"

src/librustc_codegen_llvm/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ extern crate rustc_incremental;
3939
extern crate rustc_codegen_utils;
4040
extern crate rustc_codegen_ssa;
4141
extern crate rustc_fs_util;
42+
extern crate rustc_driver as _;
4243

4344
#[macro_use] extern crate log;
4445
#[macro_use] extern crate syntax;

0 commit comments

Comments
 (0)