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