Skip to content

Commit

Permalink
rustc: Remove dylib crate type from most rustc crates
Browse files Browse the repository at this point in the history
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!
  • Loading branch information
alexcrichton committed Dec 19, 2018
1 parent 6f839fb commit 6419362
Show file tree
Hide file tree
Showing 29 changed files with 16 additions and 34 deletions.
3 changes: 1 addition & 2 deletions src/libarena/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ version = "0.0.0"
[lib]
name = "arena"
path = "lib.rs"
crate-type = ["dylib"]

[dependencies]
rustc_data_structures = { path = "../librustc_data_structures" }
rustc_data_structures = { path = "../librustc_data_structures" }
1 change: 0 additions & 1 deletion src/libfmt_macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@ version = "0.0.0"
[lib]
name = "fmt_macros"
path = "lib.rs"
crate-type = ["dylib"]
1 change: 0 additions & 1 deletion src/libgraphviz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@ version = "0.0.0"
[lib]
name = "graphviz"
path = "lib.rs"
crate-type = ["dylib"]
2 changes: 1 addition & 1 deletion src/librustc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ version = "0.0.0"
[lib]
name = "rustc"
path = "lib.rs"
crate-type = ["dylib"]
doctest = false

[dependencies]
arena = { path = "../libarena" }
Expand Down
1 change: 0 additions & 1 deletion src/librustc_allocator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ version = "0.0.0"

[lib]
path = "lib.rs"
crate-type = ["dylib"]
test = false

[dependencies]
Expand Down
4 changes: 2 additions & 2 deletions src/librustc_borrowck/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ version = "0.0.0"
[lib]
name = "rustc_borrowck"
path = "lib.rs"
crate-type = ["dylib"]
test = false
doctest = false

[dependencies]
log = "0.4"
Expand All @@ -17,4 +17,4 @@ graphviz = { path = "../libgraphviz" }
rustc = { path = "../librustc" }
rustc_mir = { path = "../librustc_mir" }
rustc_errors = { path = "../librustc_errors" }
rustc_data_structures = { path = "../librustc_data_structures" }
rustc_data_structures = { path = "../librustc_data_structures" }
1 change: 0 additions & 1 deletion src/librustc_codegen_ssa/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ version = "0.0.0"
[lib]
name = "rustc_codegen_ssa"
path = "lib.rs"
crate-type = ["dylib"]
test = false

[dependencies]
Expand Down
1 change: 0 additions & 1 deletion src/librustc_codegen_utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ version = "0.0.0"
[lib]
name = "rustc_codegen_utils"
path = "lib.rs"
crate-type = ["dylib"]
test = false

[dependencies]
Expand Down
3 changes: 0 additions & 3 deletions src/librustc_cratesio_shim/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ authors = ["The Rust Project Developers"]
name = "rustc_cratesio_shim"
version = "0.0.0"

[lib]
crate-type = ["dylib"]

[dependencies]
bitflags = "1.0"
log = "0.4"
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_data_structures/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ version = "0.0.0"
[lib]
name = "rustc_data_structures"
path = "lib.rs"
crate-type = ["dylib"]
doctest = false

[dependencies]
ena = "0.11"
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_errors/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ version = "0.0.0"
[lib]
name = "rustc_errors"
path = "lib.rs"
crate-type = ["dylib"]
doctest = false

[dependencies]
log = "0.4"
Expand Down
1 change: 0 additions & 1 deletion src/librustc_fs_util/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ version = "0.0.0"
[lib]
name = "rustc_fs_util"
path = "lib.rs"
crate-type = ["dylib"]

[dependencies]
2 changes: 1 addition & 1 deletion src/librustc_incremental/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ version = "0.0.0"
[lib]
name = "rustc_incremental"
path = "lib.rs"
crate-type = ["dylib"]
doctest = false

[dependencies]
graphviz = { path = "../libgraphviz" }
Expand Down
1 change: 0 additions & 1 deletion src/librustc_lint/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ version = "0.0.0"
[lib]
name = "rustc_lint"
path = "lib.rs"
crate-type = ["dylib"]
test = false

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_metadata/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ version = "0.0.0"
[lib]
name = "rustc_metadata"
path = "lib.rs"
crate-type = ["dylib"]
doctest = false

[dependencies]
flate2 = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_mir/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ version = "0.0.0"
[lib]
name = "rustc_mir"
path = "lib.rs"
crate-type = ["dylib"]
doctest = false

[dependencies]
arena = { path = "../libarena" }
Expand Down
1 change: 0 additions & 1 deletion src/librustc_passes/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ version = "0.0.0"
[lib]
name = "rustc_passes"
path = "lib.rs"
crate-type = ["dylib"]

[dependencies]
log = "0.4"
Expand Down
1 change: 0 additions & 1 deletion src/librustc_platform_intrinsics/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@ version = "0.0.0"
[lib]
name = "rustc_platform_intrinsics"
path = "lib.rs"
crate-type = ["dylib"]
2 changes: 1 addition & 1 deletion src/librustc_plugin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ build = false
[lib]
name = "rustc_plugin"
path = "lib.rs"
crate-type = ["dylib"]
doctest = false

[dependencies]
rustc = { path = "../librustc" }
Expand Down
3 changes: 1 addition & 2 deletions src/librustc_privacy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ version = "0.0.0"
[lib]
name = "rustc_privacy"
path = "lib.rs"
crate-type = ["dylib"]

[dependencies]
rustc = { path = "../librustc" }
rustc_typeck = { path = "../librustc_typeck" }
syntax = { path = "../libsyntax" }
syntax_pos = { path = "../libsyntax_pos" }
rustc_data_structures = { path = "../librustc_data_structures" }
rustc_data_structures = { path = "../librustc_data_structures" }
2 changes: 1 addition & 1 deletion src/librustc_resolve/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ version = "0.0.0"
[lib]
name = "rustc_resolve"
path = "lib.rs"
crate-type = ["dylib"]
test = false
doctest = false

[dependencies]
bitflags = "1.0"
Expand Down
1 change: 0 additions & 1 deletion src/librustc_save_analysis/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ version = "0.0.0"
[lib]
name = "rustc_save_analysis"
path = "lib.rs"
crate-type = ["dylib"]

[dependencies]
log = "0.4"
Expand Down
1 change: 0 additions & 1 deletion src/librustc_target/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ version = "0.0.0"
[lib]
name = "rustc_target"
path = "lib.rs"
crate-type = ["dylib"]

[dependencies]
bitflags = "1.0"
Expand Down
1 change: 0 additions & 1 deletion src/librustc_traits/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ version = "0.0.0"
[lib]
name = "rustc_traits"
path = "lib.rs"
crate-type = ["dylib"]

[dependencies]
bitflags = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_typeck/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ version = "0.0.0"
[lib]
name = "rustc_typeck"
path = "lib.rs"
crate-type = ["dylib"]
test = false
doctest = false

[dependencies]
arena = { path = "../libarena" }
Expand Down
1 change: 0 additions & 1 deletion src/libserialize/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ version = "0.0.0"
[lib]
name = "serialize"
path = "lib.rs"
crate-type = ["dylib", "rlib"]

[dependencies]
smallvec = { version = "0.6.7", features = ["union", "may_dangle"] }
2 changes: 1 addition & 1 deletion src/libsyntax/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ version = "0.0.0"
[lib]
name = "syntax"
path = "lib.rs"
crate-type = ["dylib"]
doctest = false

[dependencies]
bitflags = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion src/libsyntax_ext/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ version = "0.0.0"
[lib]
name = "syntax_ext"
path = "lib.rs"
crate-type = ["dylib"]
doctest = false

[dependencies]
fmt_macros = { path = "../libfmt_macros" }
Expand Down
2 changes: 1 addition & 1 deletion src/libsyntax_pos/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ version = "0.0.0"
[lib]
name = "syntax_pos"
path = "lib.rs"
crate-type = ["dylib"]
doctest = false

[dependencies]
serialize = { path = "../libserialize" }
Expand Down

0 comments on commit 6419362

Please sign in to comment.