mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
b47c9690d2
Since its inception rustbuild has always worked in three stages: one for libstd, one for libtest, and one for rustc. These three stages were architected around crates.io dependencies, where rustc wants to depend on crates.io crates but said crates don't explicitly depend on libstd, requiring a sysroot assembly step in the middle. This same logic was applied for libtest where libtest wants to depend on crates.io crates (`getopts`) but `getopts` didn't say that it depended on std, so it needed `std` built ahead of time. Lots of time has passed since the inception of rustbuild, however, and we've since gotten to the point where even `std` itself is depending on crates.io crates (albeit with some wonky configuration). This commit applies the same logic to the two dependencies that the `test` crate pulls in from crates.io, `getopts` and `unicode-width`. Over the many years since rustbuild's inception `unicode-width` was the only dependency picked up by the `test` crate, so the extra configuration necessary to get crates building in this crate graph is unlikely to be too much of a burden on developers. After this patch it means that there are now only two build phasese of rustbuild, one for libstd and one for rustc. The libtest/libproc_macro build phase is all lumped into one now with `std`. This was originally motivated by rust-lang/cargo#7216 where Cargo was having to deal with synthesizing dependency edges but this commit makes them explicit in this repository.
75 lines
2.3 KiB
TOML
75 lines
2.3 KiB
TOML
[workspace]
|
|
members = [
|
|
"src/bootstrap",
|
|
"src/rustc",
|
|
"src/libstd",
|
|
"src/libtest",
|
|
"src/librustc_codegen_llvm",
|
|
"src/tools/cargotest",
|
|
"src/tools/clippy",
|
|
"src/tools/compiletest",
|
|
"src/tools/error_index_generator",
|
|
"src/tools/linkchecker",
|
|
"src/tools/rustbook",
|
|
"src/tools/unstable-book-gen",
|
|
"src/tools/tidy",
|
|
"src/tools/build-manifest",
|
|
"src/tools/remote-test-client",
|
|
"src/tools/remote-test-server",
|
|
"src/tools/rust-installer",
|
|
"src/tools/cargo",
|
|
"src/tools/rustdoc",
|
|
"src/tools/rls",
|
|
"src/tools/rustfmt",
|
|
"src/tools/miri",
|
|
"src/tools/rustdoc-themes",
|
|
]
|
|
exclude = [
|
|
"build",
|
|
# HACK(eddyb) This hardcodes the fact that our CI uses `/checkout/obj`.
|
|
"obj",
|
|
]
|
|
|
|
# Curiously, LLVM 7.0 will segfault if compiled with opt-level=3
|
|
# See issue https://github.com/rust-lang/rust/issues/52378
|
|
[profile.release]
|
|
opt-level = 2
|
|
[profile.bench]
|
|
opt-level = 2
|
|
|
|
# These options are controlled from our rustc wrapper script, so turn them off
|
|
# here and have them controlled elsewhere.
|
|
[profile.dev]
|
|
debug = false
|
|
debug-assertions = false
|
|
[profile.test]
|
|
debug = false
|
|
debug-assertions = false
|
|
|
|
# We want the RLS to use the version of Cargo that we've got vendored in this
|
|
# repository to ensure that the same exact version of Cargo is used by both the
|
|
# RLS and the Cargo binary itself. The RLS depends on Cargo as a git repository
|
|
# so we use a `[patch]` here to override the github repository with our local
|
|
# vendored copy.
|
|
[patch."https://github.com/rust-lang/cargo"]
|
|
cargo = { path = "src/tools/cargo" }
|
|
|
|
[patch.crates-io]
|
|
# Similar to Cargo above we want the RLS to use a vendored version of `rustfmt`
|
|
# that we're shipping as well (to ensure that the rustfmt in RLS and the
|
|
# `rustfmt` executable are the same exact version).
|
|
rustfmt-nightly = { path = "src/tools/rustfmt" }
|
|
|
|
# See comments in `src/tools/rustc-workspace-hack/README.md` for what's going on
|
|
# here
|
|
rustc-workspace-hack = { path = 'src/tools/rustc-workspace-hack' }
|
|
|
|
# See comments in `tools/rustc-std-workspace-core/README.md` for what's going on
|
|
# here
|
|
rustc-std-workspace-core = { path = 'src/tools/rustc-std-workspace-core' }
|
|
rustc-std-workspace-alloc = { path = 'src/tools/rustc-std-workspace-alloc' }
|
|
rustc-std-workspace-std = { path = 'src/tools/rustc-std-workspace-std' }
|
|
|
|
[patch."https://github.com/rust-lang/rust-clippy"]
|
|
clippy_lints = { path = "src/tools/clippy/clippy_lints" }
|