Simplify `jemalloc` setup (without perf regression)
Reland https://github.com/rust-lang/rust/pull/146627 after fixing [the performance regression](https://github.com/rust-lang/rust/pull/148851#issuecomment-3525797560) that caused it to be reverted in https://github.com/rust-lang/rust/pull/148896.
This avoids 65f0b7a (second commit in the initial PR), and adds a comment explaining why `extern crate` is needed here instead of `use` (we need to load `tikv_jemalloc_sys` from the sysroot because of https://github.com/rust-lang/cc-rs/issues/1613).
r? Kobzol
49 lines
1.5 KiB
TOML
49 lines
1.5 KiB
TOML
[package]
|
|
name = "rustc-main"
|
|
version = "0.0.0"
|
|
edition = "2024"
|
|
|
|
[dependencies]
|
|
# tidy-alphabetical-start
|
|
|
|
# Make sure rustc_codegen_ssa ends up in the sysroot, because this
|
|
# crate is intended to be used by codegen backends, which may not be in-tree.
|
|
rustc_codegen_ssa = { path = "../rustc_codegen_ssa" }
|
|
|
|
rustc_driver = { path = "../rustc_driver" }
|
|
rustc_driver_impl = { path = "../rustc_driver_impl" }
|
|
|
|
rustc_public = { path = "../rustc_public" }
|
|
|
|
# Make sure rustc_public_bridge ends up in the sysroot, because this
|
|
# crate is intended to be used by stable MIR consumers, which are not in-tree.
|
|
rustc_public_bridge = { path = "../rustc_public_bridge" }
|
|
# tidy-alphabetical-end
|
|
|
|
# Pin these to avoid pulling in a package with a binary blob
|
|
# <https://github.com/rust-lang/rust/pull/136395#issuecomment-2692769062>
|
|
[target.'cfg(target_os = "wasi")'.dependencies]
|
|
getrandom = "=0.3.3"
|
|
wasi = "=0.14.2"
|
|
|
|
|
|
[dependencies.tikv-jemalloc-sys]
|
|
version = "0.6.1"
|
|
optional = true
|
|
features = ['override_allocator_on_supported_platforms']
|
|
|
|
[features]
|
|
# tidy-alphabetical-start
|
|
check_only = ['rustc_driver_impl/check_only']
|
|
jemalloc = ['dep:tikv-jemalloc-sys']
|
|
llvm = ['rustc_driver_impl/llvm']
|
|
llvm_enzyme = ['rustc_driver_impl/llvm_enzyme']
|
|
llvm_offload = ['rustc_driver_impl/llvm_offload']
|
|
max_level_info = ['rustc_driver_impl/max_level_info']
|
|
rustc_randomized_layouts = ['rustc_driver_impl/rustc_randomized_layouts']
|
|
# tidy-alphabetical-end
|
|
|
|
[build-dependencies]
|
|
# tidy-alphabetical-start
|
|
rustc_windows_rc = { path = "../rustc_windows_rc" }
|
|
# tidy-alphabetical-end
|