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