Skip to content

Commit 9001f22

Browse files
committed
Auto merge of #149276 - matthiaskrgr:rollup-wlrpdrr, r=matthiaskrgr
Rollup of 6 pull requests Successful merges: - rust-lang/rust#148234 (rustdoc: make mergeable crate info more usable) - rust-lang/rust#149201 (Add suggest alternatives for Out-of-range \x escapes) - rust-lang/rust#149208 ([rustdoc] Make more functions return `fmt::Result` and reduce number of `.unwrap()` calls) - rust-lang/rust#149252 (miri: use `tikv-jemalloc-sys` from sysroot) - rust-lang/rust#149255 (Use `let...else` consistently in user-facing diagnostics) - rust-lang/rust#149275 (Fix missing double-quote in `std::env::consts::OS` values) r? `@ghost` `@rustbot` modify labels: rollup
2 parents b61f16f + 39c1685 commit 9001f22

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

Cargo.toml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,6 @@ directories = "6"
2929
bitflags = "2.6"
3030
serde_json = { version = "1.0", optional = true }
3131

32-
# Copied from `compiler/rustc/Cargo.toml`.
33-
# But only for some targets, it fails for others. Rustc configures this in its CI, but we can't
34-
# easily use that since we support of-tree builds.
35-
[target.'cfg(any(target_os = "linux", target_os = "macos"))'.dependencies.tikv-jemalloc-sys]
36-
version = "0.6.1"
37-
features = ['override_allocator_on_supported_platforms']
38-
3932
[target.'cfg(unix)'.dependencies]
4033
libc = "0.2"
4134
# native-lib dependencies
@@ -75,6 +68,7 @@ stack-cache = []
7568
expensive-consistency-checks = ["stack-cache"]
7669
tracing = ["serde_json"]
7770
native-lib = ["dep:libffi", "dep:libloading", "dep:capstone", "dep:ipc-channel", "dep:nix", "dep:serde"]
71+
jemalloc = []
7872

7973
[lints.rust.unexpected_cfgs]
8074
level = "warn"

src/bin/miri.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,13 @@ extern crate rustc_session;
2121
extern crate rustc_span;
2222

2323
/// See docs in https://github.com/rust-lang/rust/blob/HEAD/compiler/rustc/src/main.rs
24-
/// and https://github.com/rust-lang/rust/pull/146627 for why we need this `use` statement.
25-
#[cfg(any(target_os = "linux", target_os = "macos"))]
26-
use tikv_jemalloc_sys as _;
24+
/// and https://github.com/rust-lang/rust/pull/146627 for why we need this.
25+
///
26+
/// FIXME(madsmtm): This is loaded from the sysroot that was built with the other `rustc` crates
27+
/// above, instead of via Cargo as you'd normally do. This is currently needed for LTO due to
28+
/// https://github.com/rust-lang/cc-rs/issues/1613.
29+
#[cfg(feature = "jemalloc")]
30+
extern crate tikv_jemalloc_sys as _;
2731

2832
mod log;
2933

0 commit comments

Comments
 (0)