]> git.lizzy.rs Git - rust.git/blobdiff - Cargo.toml
Rollup merge of #74799 - Dhs92:master, r=joshtriplett
[rust.git] / Cargo.toml
index 836897927b01530d8227ce135a433c9168829d50..efc6f4a0291ca6791b9088ad6f7a02bb4473106b 100644 (file)
@@ -1,58 +1,84 @@
-[package]
-name = "clippy"
-version = "0.0.212"
-authors = [
-       "Manish Goregaokar <manishsmail@gmail.com>",
-       "Andre Bogus <bogusandre@gmail.com>",
-       "Georg Brandl <georg@python.org>",
-       "Martin Carton <cartonmartin@gmail.com>",
-       "Oliver Schneider <clippy-iethah7aipeen8neex1a@oli-obk.de>"
+[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/rust-demangler",
+  "src/tools/cargo",
+  "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/expand-yaml-anchors",
+]
+exclude = [
+  "build",
+  # HACK(eddyb) This hardcodes the fact that our CI uses `/checkout/obj`.
+  "obj",
 ]
-description = "A bunch of helpful lints to avoid common pitfalls in Rust"
-repository = "https://github.com/rust-lang/rust-clippy"
-readme = "README.md"
-license = "MIT OR Apache-2.0"
-keywords = ["clippy", "lint", "plugin"]
-categories = ["development-tools", "development-tools::cargo-plugins"]
-build = "build.rs"
-edition = "2018"
-publish = false
 
-[[bin]]
-name = "cargo-clippy"
-test = false
-path = "src/main.rs"
+[profile.release.package.compiler_builtins]
+# The compiler-builtins crate cannot reference libcore, and it's own CI will
+# verify that this is the case. This requires, however, that the crate is built
+# without overflow checks and debug assertions. Forcefully disable debug
+# assertions and overflow checks here which should ensure that even if these
+# assertions are enabled for libstd we won't enable then for compiler_builtins
+# which should ensure we still link everything correctly.
+debug-assertions = false
+overflow-checks = false
 
-[[bin]]
-name = "clippy-driver"
-path = "src/driver.rs"
+# For compiler-builtins we always use a high number of codegen units.
+# The goal here is to place every single intrinsic into its own object
+# file to avoid symbol clashes with the system libgcc if possible. Note
+# that this number doesn't actually produce this many object files, we
+# just don't create more than this number of object files.
+#
+# It's a bit of a bummer that we have to pass this here, unfortunately.
+# Ideally this would be specified through an env var to Cargo so Cargo
+# knows how many CGUs are for this specific crate, but for now
+# per-crate configuration isn't specifiable in the environment.
+codegen-units = 10000
 
-[dependencies]
-# begin automatic update
-clippy_lints = { version = "0.0.212", path = "clippy_lints" }
-# end automatic update
-semver = "0.9"
-rustc_tools_util = { version = "0.2.0", path = "rustc_tools_util"}
-tempfile = { version = "3.1.0", optional = true }
-lazy_static = "1.0"
+# 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" }
 
-[dev-dependencies]
-cargo_metadata = "0.9.1"
-compiletest_rs = { version = "0.5.0", features = ["tmp"] }
-tester = "0.7"
-lazy_static = "1.0"
-clippy-mini-macro-test = { version = "0.2", path = "mini-macro" }
-serde = { version = "1.0", features = ["derive"] }
-derive-new = "0.5"
+[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" }
 
-# A noop dependency that changes in the Rust repository, it's a bit of a hack.
-# See the `src/tools/rustc-workspace-hack/README.md` file in `rust-lang/rust`
-# for more information.
-rustc-workspace-hack = "1.0.0"
+# 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' }
 
-[build-dependencies]
-rustc_tools_util = { version = "0.2.0", path = "rustc_tools_util"}
+# 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' }
 
-[features]
-deny-warnings = []
-integration = ["tempfile"]
+[patch."https://github.com/rust-lang/rust-clippy"]
+clippy_lints = { path = "src/tools/clippy/clippy_lints" }