mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
1f3be75f56
This ensures that the Cargo.lock packaged for it in the rust-src component is up-to-date, allowing rust-analyzer to run cargo metadata on the standard library even when the rust-src component is stored in a read-only location as is necessary for loading crates.io dependencies of the standard library. This also simplifies tidy's license check for runtime dependencies as it can now look at all entries in library/Cargo.lock without having to filter for just the dependencies of runtime crates. In addition this allows removing an exception in check_runtime_license_exceptions that was necessary due to the compiler enabling a feature on the object crate which pulls in a dependency not allowed for the standard library. While cargo workspaces normally enable dependencies of multiple targets to be reused, for the standard library we do not want this reusing to prevent conflicts between dependencies of the sysroot and of tools that are built using this sysroot. For this reason we already use an unstable cargo feature to ensure that any dependencies which would otherwise be shared get a different -Cmetadata argument as well as using separate build dirs. This doesn't change the situation around vendoring. We already have several cargo workspaces that need to be vendored. Adding another one doesn't change much. There are also no cargo profiles that are shared between the root workspace and the library workspace anyway, so it doesn't add any extra work when changing cargo profiles.
93 lines
2.9 KiB
TOML
93 lines
2.9 KiB
TOML
[workspace]
|
|
resolver = "1"
|
|
members = [
|
|
"compiler/rustc",
|
|
"src/etc/test-float-parse",
|
|
"src/rustdoc-json-types",
|
|
"src/tools/build_helper",
|
|
"src/tools/cargotest",
|
|
"src/tools/clippy",
|
|
"src/tools/clippy/clippy_dev",
|
|
"src/tools/compiletest",
|
|
"src/tools/run-make-support",
|
|
"src/tools/error_index_generator",
|
|
"src/tools/linkchecker",
|
|
"src/tools/lint-docs",
|
|
"src/tools/miropt-test-tools",
|
|
"src/tools/unstable-book-gen",
|
|
"src/tools/tidy",
|
|
"src/tools/tier-check",
|
|
"src/tools/build-manifest",
|
|
"src/tools/remote-test-client",
|
|
"src/tools/remote-test-server",
|
|
"src/tools/rust-installer",
|
|
"src/tools/rustdoc",
|
|
"src/tools/rls",
|
|
"src/tools/rustfmt",
|
|
"src/tools/miri",
|
|
"src/tools/miri/cargo-miri",
|
|
"src/tools/rustdoc-themes",
|
|
"src/tools/unicode-table-generator",
|
|
"src/tools/jsondocck",
|
|
"src/tools/jsondoclint",
|
|
"src/tools/llvm-bitcode-linker",
|
|
"src/tools/html-checker",
|
|
"src/tools/bump-stage0",
|
|
"src/tools/replace-version-placeholder",
|
|
"src/tools/lld-wrapper",
|
|
"src/tools/collect-license-metadata",
|
|
"src/tools/generate-copyright",
|
|
"src/tools/suggest-tests",
|
|
"src/tools/generate-windows-sys",
|
|
"src/tools/rustdoc-gui-test",
|
|
"src/tools/opt-dist",
|
|
"src/tools/coverage-dump",
|
|
"src/tools/rustc-perf-wrapper",
|
|
"src/tools/wasm-component-ld",
|
|
]
|
|
|
|
exclude = [
|
|
"build",
|
|
"compiler/rustc_codegen_cranelift",
|
|
"compiler/rustc_codegen_gcc",
|
|
"src/bootstrap",
|
|
"tests/rustdoc-gui",
|
|
# HACK(eddyb) This hardcodes the fact that our CI uses `/checkout/obj`.
|
|
"obj",
|
|
# The `x` binary is a thin wrapper that calls `x.py`, which initializes
|
|
# submodules, before which workspace members cannot be invoked because
|
|
# not all `Cargo.toml` files are available, so we exclude the `x` binary,
|
|
# so it can be invoked before the current checkout is set up.
|
|
"src/tools/x",
|
|
]
|
|
|
|
[profile.release.package.rustc-rayon-core]
|
|
# The rustc fork of Rayon has deadlock detection code which intermittently
|
|
# causes overflows in the CI (see https://github.com/rust-lang/rust/issues/90227)
|
|
# so we turn overflow checks off for now.
|
|
# FIXME: This workaround should be removed once #90227 is fixed.
|
|
overflow-checks = false
|
|
|
|
# These are very thin wrappers around executing lld with the right binary name.
|
|
# Basically nothing within them can go wrong without having been explicitly logged anyway.
|
|
# We ship these in every rustc tarball and even after compression they add up
|
|
# to around 0.6MB of data every user needs to download (and 15MB on disk).
|
|
[profile.release.package.lld-wrapper]
|
|
debug = 0
|
|
strip = true
|
|
[profile.release.package.wasm-component-ld-wrapper]
|
|
debug = 0
|
|
strip = true
|
|
|
|
# Bigint libraries are slow without optimization, speed up testing
|
|
[profile.dev.package.test-float-parse]
|
|
opt-level = 3
|
|
|
|
# Speed up the binary as much as possible
|
|
[profile.release.package.test-float-parse]
|
|
opt-level = 3
|
|
codegen-units = 1
|
|
# FIXME: LTO cannot be enabled for binaries in a workspace
|
|
# <https://github.com/rust-lang/cargo/issues/9330>
|
|
# lto = true
|