Skip to content

Commit b7ced6c

Browse files
committed
Auto merge of #56987 - alexcrichton:less-dylibs, r=<try>
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!
2 parents 6f839fb + 6419362 commit b7ced6c

File tree

29 files changed

+16
-34
lines changed

29 files changed

+16
-34
lines changed

src/libarena/Cargo.toml

+1-2
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

-1
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

-1
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

+1-1
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

-1
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_borrowck/Cargo.toml

+2-2
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_ssa/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ version = "0.0.0"
66
[lib]
77
name = "rustc_codegen_ssa"
88
path = "lib.rs"
9-
crate-type = ["dylib"]
109
test = false
1110

1211
[dependencies]

src/librustc_codegen_utils/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ version = "0.0.0"
66
[lib]
77
name = "rustc_codegen_utils"
88
path = "lib.rs"
9-
crate-type = ["dylib"]
109
test = false
1110

1211
[dependencies]

src/librustc_cratesio_shim/Cargo.toml

-3
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ authors = ["The Rust Project Developers"]
1616
name = "rustc_cratesio_shim"
1717
version = "0.0.0"
1818

19-
[lib]
20-
crate-type = ["dylib"]
21-
2219
[dependencies]
2320
bitflags = "1.0"
2421
log = "0.4"

src/librustc_data_structures/Cargo.toml

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

1111
[dependencies]
1212
ena = "0.11"

src/librustc_errors/Cargo.toml

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

1111
[dependencies]
1212
log = "0.4"

src/librustc_fs_util/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,5 @@ version = "0.0.0"
66
[lib]
77
name = "rustc_fs_util"
88
path = "lib.rs"
9-
crate-type = ["dylib"]
109

1110
[dependencies]

src/librustc_incremental/Cargo.toml

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

1111
[dependencies]
1212
graphviz = { path = "../libgraphviz" }

src/librustc_lint/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ version = "0.0.0"
66
[lib]
77
name = "rustc_lint"
88
path = "lib.rs"
9-
crate-type = ["dylib"]
109
test = false
1110

1211
[dependencies]

src/librustc_metadata/Cargo.toml

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

1111
[dependencies]
1212
flate2 = "1.0"

src/librustc_mir/Cargo.toml

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

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

src/librustc_passes/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ version = "0.0.0"
66
[lib]
77
name = "rustc_passes"
88
path = "lib.rs"
9-
crate-type = ["dylib"]
109

1110
[dependencies]
1211
log = "0.4"

src/librustc_platform_intrinsics/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,3 @@ version = "0.0.0"
66
[lib]
77
name = "rustc_platform_intrinsics"
88
path = "lib.rs"
9-
crate-type = ["dylib"]

src/librustc_plugin/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ build = false
77
[lib]
88
name = "rustc_plugin"
99
path = "lib.rs"
10-
crate-type = ["dylib"]
10+
doctest = false
1111

1212
[dependencies]
1313
rustc = { path = "../librustc" }

src/librustc_privacy/Cargo.toml

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@ version = "0.0.0"
66
[lib]
77
name = "rustc_privacy"
88
path = "lib.rs"
9-
crate-type = ["dylib"]
109

1110
[dependencies]
1211
rustc = { path = "../librustc" }
1312
rustc_typeck = { path = "../librustc_typeck" }
1413
syntax = { path = "../libsyntax" }
1514
syntax_pos = { path = "../libsyntax_pos" }
16-
rustc_data_structures = { path = "../librustc_data_structures" }
15+
rustc_data_structures = { path = "../librustc_data_structures" }

src/librustc_resolve/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ version = "0.0.0"
66
[lib]
77
name = "rustc_resolve"
88
path = "lib.rs"
9-
crate-type = ["dylib"]
109
test = false
10+
doctest = false
1111

1212
[dependencies]
1313
bitflags = "1.0"

src/librustc_save_analysis/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ version = "0.0.0"
66
[lib]
77
name = "rustc_save_analysis"
88
path = "lib.rs"
9-
crate-type = ["dylib"]
109

1110
[dependencies]
1211
log = "0.4"

src/librustc_target/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ version = "0.0.0"
66
[lib]
77
name = "rustc_target"
88
path = "lib.rs"
9-
crate-type = ["dylib"]
109

1110
[dependencies]
1211
bitflags = "1.0"

src/librustc_traits/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ version = "0.0.0"
66
[lib]
77
name = "rustc_traits"
88
path = "lib.rs"
9-
crate-type = ["dylib"]
109

1110
[dependencies]
1211
bitflags = "1.0"

src/librustc_typeck/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ version = "0.0.0"
66
[lib]
77
name = "rustc_typeck"
88
path = "lib.rs"
9-
crate-type = ["dylib"]
109
test = false
10+
doctest = false
1111

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

src/libserialize/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ version = "0.0.0"
66
[lib]
77
name = "serialize"
88
path = "lib.rs"
9-
crate-type = ["dylib", "rlib"]
109

1110
[dependencies]
1211
smallvec = { version = "0.6.7", features = ["union", "may_dangle"] }

src/libsyntax/Cargo.toml

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

1111
[dependencies]
1212
bitflags = "1.0"

src/libsyntax_ext/Cargo.toml

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

1111
[dependencies]
1212
fmt_macros = { path = "../libfmt_macros" }

src/libsyntax_pos/Cargo.toml

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

1111
[dependencies]
1212
serialize = { path = "../libserialize" }

0 commit comments

Comments
 (0)