In #56986 the linkage of jemalloc to the compiler was switched from the driver library to the rustc binary to ensure that only rustc itself uses jemalloc. In doing so, however, it turns out jemalloc wasn't actually linked in at all! None of the symbols were referenced so the static library wasn't used. This means that jemalloc wasn't pulled in at all. This commit performs a bit of a dance to reference jemalloc symbols, attempting to pull it in despite LLVM's optimizations. Closes #57115
26 lines
628 B
TOML
26 lines
628 B
TOML
[package]
|
|
authors = ["The Rust Project Developers"]
|
|
name = "rustc-main"
|
|
version = "0.0.0"
|
|
edition = '2018'
|
|
|
|
[[bin]]
|
|
name = "rustc_binary"
|
|
path = "rustc.rs"
|
|
|
|
[dependencies]
|
|
rustc_target = { path = "../librustc_target" }
|
|
rustc_driver = { path = "../librustc_driver" }
|
|
|
|
# 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 = "../librustc_codegen_ssa" }
|
|
|
|
[dependencies.jemalloc-sys]
|
|
version = '0.1.8'
|
|
optional = true
|
|
features = ['unprefixed_malloc_on_supported_platforms']
|
|
|
|
[features]
|
|
jemalloc = ['jemalloc-sys']
|