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