]> git.lizzy.rs Git - rust.git/blob - Cargo.toml
std: Switch from libbacktrace to gimli
[rust.git] / Cargo.toml
1 [workspace]
2 members = [
3   "src/bootstrap",
4   "src/rustc",
5   "src/librustc_codegen_llvm",
6   "library/std",
7   "library/test",
8   "src/tools/cargotest",
9   "src/tools/clippy",
10   "src/tools/compiletest",
11   "src/tools/error_index_generator",
12   "src/tools/linkchecker",
13   "src/tools/rustbook",
14   "src/tools/unstable-book-gen",
15   "src/tools/tidy",
16   "src/tools/build-manifest",
17   "src/tools/remote-test-client",
18   "src/tools/remote-test-server",
19   "src/tools/rust-installer",
20   "src/tools/rust-demangler",
21   "src/tools/cargo",
22   "src/tools/rustdoc",
23   "src/tools/rls",
24   "src/tools/rustfmt",
25   "src/tools/miri",
26   "src/tools/miri/cargo-miri",
27   "src/tools/rustdoc-themes",
28   "src/tools/unicode-table-generator",
29   "src/tools/expand-yaml-anchors",
30 ]
31 exclude = [
32   "build",
33   # HACK(eddyb) This hardcodes the fact that our CI uses `/checkout/obj`.
34   "obj",
35 ]
36
37 [profile.release.package.compiler_builtins]
38 # The compiler-builtins crate cannot reference libcore, and it's own CI will
39 # verify that this is the case. This requires, however, that the crate is built
40 # without overflow checks and debug assertions. Forcefully disable debug
41 # assertions and overflow checks here which should ensure that even if these
42 # assertions are enabled for libstd we won't enable then for compiler_builtins
43 # which should ensure we still link everything correctly.
44 debug-assertions = false
45 overflow-checks = false
46
47 # For compiler-builtins we always use a high number of codegen units.
48 # The goal here is to place every single intrinsic into its own object
49 # file to avoid symbol clashes with the system libgcc if possible. Note
50 # that this number doesn't actually produce this many object files, we
51 # just don't create more than this number of object files.
52 #
53 # It's a bit of a bummer that we have to pass this here, unfortunately.
54 # Ideally this would be specified through an env var to Cargo so Cargo
55 # knows how many CGUs are for this specific crate, but for now
56 # per-crate configuration isn't specifiable in the environment.
57 codegen-units = 10000
58
59 # These dependencies of the standard library implement symbolication for
60 # backtraces on most platforms. Their debuginfo causes both linking to be slower
61 # (more data to chew through) and binaries to be larger without really all that
62 # much benefit. This section turns them all to down to have no debuginfo which
63 # helps to improve link times a little bit.
64 [profile.release.package]
65 addr2line.debug = 0
66 adler.debug = 0
67 gimli.debug = 0
68 miniz_oxide.debug = 0
69 object.debug = 0
70
71 # We want the RLS to use the version of Cargo that we've got vendored in this
72 # repository to ensure that the same exact version of Cargo is used by both the
73 # RLS and the Cargo binary itself. The RLS depends on Cargo as a git repository
74 # so we use a `[patch]` here to override the github repository with our local
75 # vendored copy.
76 [patch."https://github.com/rust-lang/cargo"]
77 cargo = { path = "src/tools/cargo" }
78
79 [patch.crates-io]
80 # Similar to Cargo above we want the RLS to use a vendored version of `rustfmt`
81 # that we're shipping as well (to ensure that the rustfmt in RLS and the
82 # `rustfmt` executable are the same exact version).
83 rustfmt-nightly = { path = "src/tools/rustfmt" }
84
85 # See comments in `src/tools/rustc-workspace-hack/README.md` for what's going on
86 # here
87 rustc-workspace-hack = { path = 'src/tools/rustc-workspace-hack' }
88
89 # See comments in `library/rustc-std-workspace-core/README.md` for what's going on
90 # here
91 rustc-std-workspace-core = { path = 'library/rustc-std-workspace-core' }
92 rustc-std-workspace-alloc = { path = 'library/rustc-std-workspace-alloc' }
93 rustc-std-workspace-std = { path = 'library/rustc-std-workspace-std' }
94
95 # This crate's integration with libstd is a bit wonky, so we use a submodule
96 # instead of a crates.io dependency. Make sure everything else in the repo is
97 # also using the submodule, however, so we can avoid duplicate copies of the
98 # source code for this crate.
99 backtrace = { path = "library/backtrace" }
100
101 [patch."https://github.com/rust-lang/rust-clippy"]
102 clippy_lints = { path = "src/tools/clippy/clippy_lints" }