Skip to content

Commit 8a0c362

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 d21bebe commit 8a0c362

File tree

39 files changed

+17
-87
lines changed

39 files changed

+17
-87
lines changed

src/bootstrap/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1125,8 +1125,6 @@ impl Build {
11251125
/// `rust.save-toolstates` in `config.toml`. If unspecified, nothing will be
11261126
/// done. The file is updated immediately after this function completes.
11271127
pub fn save_toolstate(&self, tool: &str, state: ToolState) {
1128-
use std::io::{Seek, SeekFrom};
1129-
11301128
if let Some(ref path) = self.config.save_toolstates {
11311129
let mut file = t!(fs::OpenOptions::new()
11321130
.create(true)

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: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,3 @@ edition = "2018"
77
[lib]
88
name = "fmt_macros"
99
path = "lib.rs"
10-
crate-type = ["dylib"]

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
@@ -43,7 +43,6 @@
4343
#![feature(extern_types)]
4444
#![feature(nll)]
4545
#![feature(non_exhaustive)]
46-
#![feature(proc_macro_internals)]
4746
#![feature(optin_builtin_traits)]
4847
#![feature(range_is_empty)]
4948
#![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"

0 commit comments

Comments
 (0)