]> git.lizzy.rs Git - rust.git/blobdiff - Cargo.toml
Auto merge of #107843 - bjorn3:sync_cg_clif-2023-02-09, r=bjorn3
[rust.git] / Cargo.toml
index f03cc34a81081b2acc79fbac7651fff575080a6e..15cbb2659c9b335ea3f1bb9b77af86f3b74bd8fc 100644 (file)
-[package]
-name = "rustc_codegen_cranelift"
-version = "0.1.0"
-edition = "2021"
-
-[[bin]]
-# This is used just to teach rust-analyzer how to check the build system. required-features is used
-# to disable it for regular builds.
-name = "y"
-path = "./y.rs"
-required-features = ["__check_build_system_using_ra"]
-
-[lib]
-crate-type = ["dylib"]
-
-[dependencies]
-# These have to be in sync with each other
-cranelift-codegen = { version = "0.91", features = ["unwind", "all-arch"] }
-cranelift-frontend = "0.91"
-cranelift-module = "0.91"
-cranelift-native = "0.91"
-cranelift-jit = { version = "0.91", optional = true }
-cranelift-object = "0.91"
-target-lexicon = "0.12.0"
-gimli = { version = "0.26.0", default-features = false, features = ["write"]}
-object = { version = "0.29.0", default-features = false, features = ["std", "read_core", "write", "archive", "coff", "elf", "macho", "pe"] }
-
-indexmap = "1.9.1"
-libloading = { version = "0.7.3", optional = true }
-once_cell = "1.10.0"
-smallvec = "1.8.1"
+[workspace]
+members = [
+  "compiler/rustc",
+  "library/std",
+  "library/test",
+  "src/rustdoc-json-types",
+  "src/tools/build_helper",
+  "src/tools/cargotest",
+  "src/tools/clippy",
+  "src/tools/clippy/clippy_dev",
+  "src/tools/compiletest",
+  "src/tools/error_index_generator",
+  "src/tools/linkchecker",
+  "src/tools/lint-docs",
+  "src/tools/miropt-test-tools",
+  "src/tools/rustbook",
+  "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/rust-demangler",
+  "src/tools/cargo",
+  "src/tools/cargo/crates/credential/cargo-credential-1password",
+  "src/tools/cargo/crates/credential/cargo-credential-macos-keychain",
+  "src/tools/cargo/crates/credential/cargo-credential-wincred",
+  "src/tools/cargo/crates/mdman",
+  # "src/tools/cargo/crates/resolver-tests",
+  "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",
+  "src/tools/jsondocck",
+  "src/tools/jsondoclint",
+  "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",
+]
+
+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",
+  # stdarch has its own Cargo workspace
+  "library/stdarch",
+]
+
+[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 them for compiler_builtins
+# which should ensure we still link everything correctly.
+debug-assertions = false
+overflow-checks = false
+
+# 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
+
+[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 dependencies of the standard library implement symbolication for
+# backtraces on most platforms. Their debuginfo causes both linking to be slower
+# (more data to chew through) and binaries to be larger without really all that
+# much benefit. This section turns them all to down to have no debuginfo which
+# helps to improve link times a little bit.
+[profile.release.package]
+addr2line.debug = 0
+adler.debug = 0
+gimli.debug = 0
+miniz_oxide.debug = 0
+object.debug = 0
 
 [patch.crates-io]
-# Uncomment to use local checkout of cranelift
-#cranelift-codegen = { path = "../wasmtime/cranelift/codegen" }
-#cranelift-frontend = { path = "../wasmtime/cranelift/frontend" }
-#cranelift-module = { path = "../wasmtime/cranelift/module" }
-#cranelift-native = { path = "../wasmtime/cranelift/native" }
-#cranelift-jit = { path = "../wasmtime/cranelift/jit" }
-#cranelift-object = { path = "../wasmtime/cranelift/object" }
-
-#gimli = { path = "../" }
-
-[features]
-# Enable features not ready to be enabled when compiling as part of rustc
-unstable-features = ["jit", "inline_asm"]
-jit = ["cranelift-jit", "libloading"]
-inline_asm = []
-__check_build_system_using_ra = []
-
-[package.metadata.rust-analyzer]
-rustc_private = true
+# 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 `library/rustc-std-workspace-core/README.md` for what's going on
+# here
+rustc-std-workspace-core = { path = 'library/rustc-std-workspace-core' }
+rustc-std-workspace-alloc = { path = 'library/rustc-std-workspace-alloc' }
+rustc-std-workspace-std = { path = 'library/rustc-std-workspace-std' }
+
+[patch."https://github.com/rust-lang/rust-clippy"]
+clippy_lints = { path = "src/tools/clippy/clippy_lints" }