]> git.lizzy.rs Git - rust.git/blob - src/librustc/Cargo.toml
rustc: Load the `rustc_trans` crate at runtime
[rust.git] / src / librustc / Cargo.toml
1 [package]
2 authors = ["The Rust Project Developers"]
3 name = "rustc"
4 version = "0.0.0"
5
6 [lib]
7 name = "rustc"
8 path = "lib.rs"
9 crate-type = ["dylib"]
10
11 [dependencies]
12 arena = { path = "../libarena" }
13 bitflags = "1.0"
14 fmt_macros = { path = "../libfmt_macros" }
15 graphviz = { path = "../libgraphviz" }
16 jobserver = "0.1"
17 log = { version = "0.4", features = ["release_max_level_info", "std"] }
18 rustc_apfloat = { path = "../librustc_apfloat" }
19 rustc_back = { path = "../librustc_back" }
20 rustc_const_math = { path = "../librustc_const_math" }
21 rustc_data_structures = { path = "../librustc_data_structures" }
22 rustc_errors = { path = "../librustc_errors" }
23 serialize = { path = "../libserialize" }
24 syntax = { path = "../libsyntax" }
25 syntax_pos = { path = "../libsyntax_pos" }
26 backtrace = "0.3.3"
27 byteorder = { version = "1.1", features = ["i128"]}
28
29 # Note that these dependencies are a lie, they're just here to get linkage to
30 # work.
31 #
32 # We're creating a bunch of dylibs for the compiler but we're also compiling a
33 # bunch of crates.io crates. Everything in the compiler is compiled as an
34 # rlib/dylib pair but all crates.io crates tend to just be rlibs. This means
35 # we've got a problem for dependency graphs that look like:
36 #
37 #           foo - rustc_trans
38 #         /                  \
39 #   rustc                     ---- rustc_driver
40 #         \                     /
41 #           foo - rustc_metadata
42 #
43 # Here the crate `foo` is linked into the `rustc_trans` and the
44 # `rustc_metadata` dylibs, meaning we've got duplicate copies! When we then
45 # go to link `rustc_driver` the compiler notices this and gives us a compiler
46 # error.
47 #
48 # To work around this problem we just add these crates.io dependencies to the
49 # `rustc` crate which is a shared dependency above. That way the crate `foo`
50 # shows up in the dylib for the `rustc` crate, deduplicating it and allowing
51 # crates like `rustc_trans` to use `foo` *through* the `rustc` crate.
52 #
53 # tl;dr; this is not needed to get `rustc` to compile, but if you remove it then
54 #        later crate stop compiling. If you can remove this and everything
55 #        compiles, then please feel free to do so!
56 flate2 = "1.0"