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