diff --git a/Cargo.lock b/Cargo.lock index 2de9c84e3b031..0cf0dbb2ac120 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -493,8 +493,10 @@ checksum = "c469d952047f47f91b68d1cba3f10d63c11d73e4636f24f08daf0278abf01c4d" dependencies = [ "android-tzdata", "iana-time-zone", + "js-sys", "num-traits", "serde", + "wasm-bindgen", "windows-link", ] @@ -583,6 +585,7 @@ dependencies = [ "declare_clippy_lint", "filetime", "itertools", + "libtcmalloc-sys", "pulldown-cmark", "regex", "rustc_tools_util 0.4.2", @@ -1194,6 +1197,15 @@ version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8975ffdaa0ef3661bfe02dbdcc06c9f829dfafe6a3c474de366a8d5e44276921" +[[package]] +name = "document-features" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95249b50c6c185bee49034bcb378a49dc2b5dff0be90ff6616d31d64febab05d" +dependencies = [ + "litrs", +] + [[package]] name = "dyn-clone" version = "1.0.19" @@ -2161,6 +2173,18 @@ dependencies = [ "redox_syscall", ] +[[package]] +name = "libtcmalloc-sys" +version = "0.1.14" +source = "git+https://github.com/0xdeafbeef/tcmalloc-better.git?rev=781a440a0919#781a440a091933e35ecbfd082fc0393bea6481ad" +dependencies = [ + "cc", + "document-features", + "libc", + "patch", + "strum 0.27.2", +] + [[package]] name = "libz-sys" version = "1.1.22" @@ -2213,6 +2237,12 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956" +[[package]] +name = "litrs" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5e54036fe321fd421e10d732f155734c4e4afd610dd556d9a82833ab3ee0bed" + [[package]] name = "lld-wrapper" version = "0.1.0" @@ -2392,6 +2422,7 @@ dependencies = [ "libc", "libffi", "libloading", + "libtcmalloc-sys", "measureme", "nix", "rand 0.9.2", @@ -2401,7 +2432,6 @@ dependencies = [ "serde_json", "smallvec", "tempfile", - "tikv-jemalloc-sys", "ui_test", ] @@ -2437,6 +2467,17 @@ dependencies = [ "minimal-lexical", ] +[[package]] +name = "nom_locate" +version = "4.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e3c83c053b0713da60c5b8de47fe8e494fe3ece5267b2f23090a07a053ba8f3" +dependencies = [ + "bytecount", + "memchr", + "nom", +] + [[package]] name = "normpath" version = "1.3.0" @@ -2752,6 +2793,17 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "patch" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15c07fdcdd8b05bdcf2a25bc195b6c34cbd52762ada9dba88bf81e7686d14e7a" +dependencies = [ + "chrono", + "nom", + "nom_locate", +] + [[package]] name = "pathdiff" version = "0.2.3" @@ -3285,13 +3337,13 @@ checksum = "e4ee29da77c5a54f42697493cd4c9b9f31b74df666a6c04dfc4fde77abe0438b" name = "rustc-main" version = "0.0.0" dependencies = [ + "libtcmalloc-sys", "rustc_codegen_ssa", "rustc_driver", "rustc_driver_impl", "rustc_public", "rustc_public_bridge", "rustc_windows_rc", - "tikv-jemalloc-sys", ] [[package]] @@ -4781,6 +4833,7 @@ dependencies = [ "expect-test", "indexmap", "itertools", + "libtcmalloc-sys", "minifier", "pulldown-cmark-escape", "regex", @@ -5183,8 +5236,8 @@ dependencies = [ "nom", "serde", "spdx-expression", - "strum", - "strum_macros", + "strum 0.24.1", + "strum_macros 0.24.3", "thiserror 1.0.69", "uuid", ] @@ -5260,6 +5313,15 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" +[[package]] +name = "strum" +version = "0.27.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af23d6f6c1a224baef9d3f61e287d2761385a5b88fdab4eb4c6f11aeb54c4bcf" +dependencies = [ + "strum_macros 0.27.2", +] + [[package]] name = "strum_macros" version = "0.24.3" @@ -5273,6 +5335,18 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "strum_macros" +version = "0.27.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7695ce3845ea4b33927c055a39dc438a45b059f7c1b3d91d38d10355fb8cbca7" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "syn 2.0.106", +] + [[package]] name = "syn" version = "1.0.109" @@ -5503,16 +5577,6 @@ dependencies = [ name = "tier-check" version = "0.1.0" -[[package]] -name = "tikv-jemalloc-sys" -version = "0.6.0+5.3.0-1-ge13ca993e8ccb9ba9847cc330696e02839f328f7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd3c60906412afa9c2b5b5a48ca6a5abe5736aec9eb48ad05037a677e52e4e2d" -dependencies = [ - "cc", - "libc", -] - [[package]] name = "tinystr" version = "0.8.1" diff --git a/compiler/rustc/Cargo.toml b/compiler/rustc/Cargo.toml index 9ef8fa75062a2..b9844c294c76d 100644 --- a/compiler/rustc/Cargo.toml +++ b/compiler/rustc/Cargo.toml @@ -20,15 +20,14 @@ rustc_public = { path = "../rustc_public" } rustc_public_bridge = { path = "../rustc_public_bridge" } # tidy-alphabetical-end -[dependencies.tikv-jemalloc-sys] -version = "0.6.0" -optional = true -features = ['unprefixed_malloc_on_supported_platforms'] + +[target.'cfg(all(target_os = "linux", target_arch = "x86_64"))'.dependencies] +libtcmalloc-sys = { git = "https://github.com/0xdeafbeef/tcmalloc-better.git", rev = "781a440a0919", default-features = false, features = ["unprefixed_malloc_on_supported_platforms", "32k_pages", "override_cpp_operators"] } [features] # tidy-alphabetical-start check_only = ['rustc_driver_impl/check_only'] -jemalloc = ['dep:tikv-jemalloc-sys'] +jemalloc = [] llvm = ['rustc_driver_impl/llvm'] llvm_enzyme = ['rustc_driver_impl/llvm_enzyme'] max_level_info = ['rustc_driver_impl/max_level_info'] diff --git a/compiler/rustc/src/main.rs b/compiler/rustc/src/main.rs index ca1bb59e59d60..81bfcf8089af3 100644 --- a/compiler/rustc/src/main.rs +++ b/compiler/rustc/src/main.rs @@ -39,39 +39,32 @@ fn main() { // See the comment at the top of this file for an explanation of this. - #[cfg(feature = "jemalloc")] + #[cfg(all(target_os = "linux", target_arch = "x86_64"))] { use std::os::raw::{c_int, c_void}; - use tikv_jemalloc_sys as jemalloc_sys; - #[used] - static _F1: unsafe extern "C" fn(usize, usize) -> *mut c_void = jemalloc_sys::calloc; + static _TCMALLOC_BRIDGE_ALLOC: unsafe extern "C" fn(usize, usize) -> *mut c_void = + libtcmalloc_sys::aligned_alloc; #[used] - static _F2: unsafe extern "C" fn(*mut *mut c_void, usize, usize) -> c_int = - jemalloc_sys::posix_memalign; + static CALLOC: unsafe extern "C" fn(usize, usize) -> *mut c_void = libtcmalloc_sys::calloc; #[used] - static _F3: unsafe extern "C" fn(usize, usize) -> *mut c_void = jemalloc_sys::aligned_alloc; + static TCMALLOC_POSIX_MEMALIGN: unsafe extern "C" fn( + *mut *mut c_void, + usize, + usize, + ) -> c_int = libtcmalloc_sys::posix_memalign; #[used] - static _F4: unsafe extern "C" fn(usize) -> *mut c_void = jemalloc_sys::malloc; + static _TCMALLOC_ALIGNED_ALLOC: unsafe extern "C" fn(usize, usize) -> *mut c_void = + libtcmalloc_sys::aligned_alloc; #[used] - static _F5: unsafe extern "C" fn(*mut c_void, usize) -> *mut c_void = jemalloc_sys::realloc; + static _TCMALLOC_MALLOC: unsafe extern "C" fn(usize) -> *mut c_void = + libtcmalloc_sys::malloc; #[used] - static _F6: unsafe extern "C" fn(*mut c_void) = jemalloc_sys::free; - - // On OSX, jemalloc doesn't directly override malloc/free, but instead - // registers itself with the allocator's zone APIs in a ctor. However, - // the linker doesn't seem to consider ctors as "used" when statically - // linking, so we need to explicitly depend on the function. - #[cfg(target_os = "macos")] - { - unsafe extern "C" { - fn _rjem_je_zone_register(); - } - - #[used] - static _F7: unsafe extern "C" fn() = _rjem_je_zone_register; - } + static _TCMALLOC_REALLOC: unsafe extern "C" fn(*mut c_void, usize) -> *mut c_void = + libtcmalloc_sys::realloc; + #[used] + static _TCMALLOC_FREE: unsafe extern "C" fn(*mut c_void) = libtcmalloc_sys::free; } rustc_driver::main() diff --git a/src/librustdoc/Cargo.toml b/src/librustdoc/Cargo.toml index f9c2465fb3c38..ed07ae89c271f 100644 --- a/src/librustdoc/Cargo.toml +++ b/src/librustdoc/Cargo.toml @@ -29,6 +29,9 @@ tracing-tree = "0.3.0" unicode-segmentation = "1.9" # tidy-alphabetical-end +[target.'cfg(all(target_os = "linux", target_arch = "x86_64"))'.dependencies] +libtcmalloc-sys = { git = "https://github.com/0xdeafbeef/tcmalloc-better.git", rev = "781a440a0919", default-features = false, features = ["unprefixed_malloc_on_supported_platforms", "32k_pages", "override_cpp_operators"] } + [dependencies.tracing-subscriber] version = "0.3.3" default-features = false @@ -41,8 +44,5 @@ minifier = { version = "0.3.2", default-features = false } [dev-dependencies] expect-test = "1.4.0" -[features] -jemalloc = [] - [package.metadata.rust-analyzer] rustc_private = true diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs index d7ffb25f8bd81..e746dc69bcfa0 100644 --- a/src/librustdoc/lib.rs +++ b/src/librustdoc/lib.rs @@ -62,11 +62,6 @@ extern crate rustc_target; extern crate rustc_trait_selection; extern crate test; -// See docs in https://github.com/rust-lang/rust/blob/master/compiler/rustc/src/main.rs -// about jemalloc. -#[cfg(feature = "jemalloc")] -extern crate tikv_jemalloc_sys as jemalloc_sys; - use std::env::{self, VarError}; use std::io::{self, IsTerminal}; use std::path::Path; @@ -126,34 +121,44 @@ mod visit_lib; pub fn main() { // See docs in https://github.com/rust-lang/rust/blob/master/compiler/rustc/src/main.rs - // about jemalloc. - #[cfg(feature = "jemalloc")] + // about tcmalloc. + #[cfg(all(target_os = "linux", target_arch = "x86_64"))] { use std::os::raw::{c_int, c_void}; + unsafe extern "C" { + fn calloc(count: usize, size: usize) -> *mut c_void; + fn posix_memalign(ptr: *mut *mut c_void, alignment: usize, size: usize) -> c_int; + fn aligned_alloc(alignment: usize, size: usize) -> *mut c_void; + fn malloc(size: usize) -> *mut c_void; + fn realloc(ptr: *mut c_void, size: usize) -> *mut c_void; + fn free(ptr: *mut c_void); + } + #[used] - static _F1: unsafe extern "C" fn(usize, usize) -> *mut c_void = jemalloc_sys::calloc; + static _TCMALLOC_BRIDGE_ALLOC: unsafe extern "C" fn(usize, usize) -> *mut c_void = + libtcmalloc_sys::BridgeTCMallocInternalNewAlignedNothrow; #[used] - static _F2: unsafe extern "C" fn(*mut *mut c_void, usize, usize) -> c_int = - jemalloc_sys::posix_memalign; + static _TCMALLOC_BRIDGE_DELETE_ALIGNED: unsafe extern "C" fn(*mut c_void, usize) = + libtcmalloc_sys::TCMallocInternalDeleteAligned; + #[used] - static _F3: unsafe extern "C" fn(usize, usize) -> *mut c_void = jemalloc_sys::aligned_alloc; + static _TCMALLOC_CALLOC: unsafe extern "C" fn(usize, usize) -> *mut c_void = calloc; #[used] - static _F4: unsafe extern "C" fn(usize) -> *mut c_void = jemalloc_sys::malloc; + static _TCMALLOC_POSIX_MEMALIGN: unsafe extern "C" fn( + *mut *mut c_void, + usize, + usize, + ) -> c_int = posix_memalign; #[used] - static _F5: unsafe extern "C" fn(*mut c_void, usize) -> *mut c_void = jemalloc_sys::realloc; + static _TCMALLOC_ALIGNED_ALLOC: unsafe extern "C" fn(usize, usize) -> *mut c_void = + aligned_alloc; #[used] - static _F6: unsafe extern "C" fn(*mut c_void) = jemalloc_sys::free; - - #[cfg(target_os = "macos")] - { - unsafe extern "C" { - fn _rjem_je_zone_register(); - } - - #[used] - static _F7: unsafe extern "C" fn() = _rjem_je_zone_register; - } + static _TCMALLOC_MALLOC: unsafe extern "C" fn(usize) -> *mut c_void = malloc; + #[used] + static _TCMALLOC_REALLOC: unsafe extern "C" fn(*mut c_void, usize) -> *mut c_void = realloc; + #[used] + static _TCMALLOC_FREE: unsafe extern "C" fn(*mut c_void) = free; } let mut early_dcx = EarlyDiagCtxt::new(ErrorOutputType::default()); diff --git a/src/tools/clippy/Cargo.toml b/src/tools/clippy/Cargo.toml index e06383499893a..54d53b10290ae 100644 --- a/src/tools/clippy/Cargo.toml +++ b/src/tools/clippy/Cargo.toml @@ -32,6 +32,9 @@ termize = "0.2" color-print = "0.3.4" anstream = "0.6.18" +[target.'cfg(all(target_os = "linux", target_arch = "x86_64"))'.dependencies] +libtcmalloc-sys = { git = "https://github.com/0xdeafbeef/tcmalloc-better.git", rev = "781a440a0919", default-features = false, features = ["unprefixed_malloc_on_supported_platforms", "32k_pages", "override_cpp_operators"] } + [dev-dependencies] cargo_metadata = "0.18.1" ui_test = "0.30.2" @@ -51,7 +54,6 @@ rustc_tools_util = { path = "rustc_tools_util", version = "0.4.2" } [features] integration = ["dep:tempfile"] internal = ["dep:clippy_lints_internal", "dep:tempfile"] -jemalloc = [] [package.metadata.rust-analyzer] # This package uses #[feature(rustc_private)] diff --git a/src/tools/clippy/src/driver.rs b/src/tools/clippy/src/driver.rs index 6bddcbfd94ce4..0ad04e9a326cc 100644 --- a/src/tools/clippy/src/driver.rs +++ b/src/tools/clippy/src/driver.rs @@ -13,11 +13,6 @@ extern crate rustc_interface; extern crate rustc_session; extern crate rustc_span; -// See docs in https://github.com/rust-lang/rust/blob/master/compiler/rustc/src/main.rs -// about jemalloc. -#[cfg(feature = "jemalloc")] -extern crate tikv_jemalloc_sys as jemalloc_sys; - use clippy_utils::sym; use declare_clippy_lint::LintListBuilder; use rustc_interface::interface; @@ -193,33 +188,40 @@ const BUG_REPORT_URL: &str = "https://github.com/rust-lang/rust-clippy/issues/ne #[allow(clippy::ignored_unit_patterns)] pub fn main() { // See docs in https://github.com/rust-lang/rust/blob/master/compiler/rustc/src/main.rs - // about jemalloc. - #[cfg(feature = "jemalloc")] + // about tcmalloc. + #[cfg(all(target_os = "linux", target_arch = "x86_64"))] { use std::os::raw::{c_int, c_void}; + extern "C" { + fn calloc(count: usize, size: usize) -> *mut c_void; + fn posix_memalign(ptr: *mut *mut c_void, alignment: usize, size: usize) -> c_int; + fn aligned_alloc(alignment: usize, size: usize) -> *mut c_void; + fn malloc(size: usize) -> *mut c_void; + fn realloc(ptr: *mut c_void, size: usize) -> *mut c_void; + fn free(ptr: *mut c_void); + } + #[used] - static _F1: unsafe extern "C" fn(usize, usize) -> *mut c_void = jemalloc_sys::calloc; + static _TCMALLOC_BRIDGE_ALLOC: unsafe extern "C" fn(usize, usize) -> *mut c_void = + libtcmalloc_sys::BridgeTCMallocInternalNewAlignedNothrow; #[used] - static _F2: unsafe extern "C" fn(*mut *mut c_void, usize, usize) -> c_int = jemalloc_sys::posix_memalign; + static _TCMALLOC_BRIDGE_DELETE_ALIGNED: unsafe extern "C" fn(*mut c_void, usize) = + libtcmalloc_sys::TCMallocInternalDeleteAligned; + #[used] - static _F3: unsafe extern "C" fn(usize, usize) -> *mut c_void = jemalloc_sys::aligned_alloc; + static _TCMALLOC_CALLOC: unsafe extern "C" fn(usize, usize) -> *mut c_void = calloc; #[used] - static _F4: unsafe extern "C" fn(usize) -> *mut c_void = jemalloc_sys::malloc; + static _TCMALLOC_POSIX_MEMALIGN: unsafe extern "C" fn(*mut *mut c_void, usize, usize) -> c_int = + posix_memalign; #[used] - static _F5: unsafe extern "C" fn(*mut c_void, usize) -> *mut c_void = jemalloc_sys::realloc; + static _TCMALLOC_ALIGNED_ALLOC: unsafe extern "C" fn(usize, usize) -> *mut c_void = aligned_alloc; #[used] - static _F6: unsafe extern "C" fn(*mut c_void) = jemalloc_sys::free; - - #[cfg(target_os = "macos")] - { - unsafe extern "C" { - fn _rjem_je_zone_register(); - } - - #[used] - static _F7: unsafe extern "C" fn() = _rjem_je_zone_register; - } + static _TCMALLOC_MALLOC: unsafe extern "C" fn(usize) -> *mut c_void = malloc; + #[used] + static _TCMALLOC_REALLOC: unsafe extern "C" fn(*mut c_void, usize) -> *mut c_void = realloc; + #[used] + static _TCMALLOC_FREE: unsafe extern "C" fn(*mut c_void) = free; } let early_dcx = EarlyDiagCtxt::new(ErrorOutputType::default()); diff --git a/src/tools/miri/Cargo.toml b/src/tools/miri/Cargo.toml index 12123c260da0a..c62fe2ad2fbb1 100644 --- a/src/tools/miri/Cargo.toml +++ b/src/tools/miri/Cargo.toml @@ -32,9 +32,8 @@ serde_json = { version = "1.0", optional = true } # Copied from `compiler/rustc/Cargo.toml`. # But only for some targets, it fails for others. Rustc configures this in its CI, but we can't # easily use that since we support of-tree builds. -[target.'cfg(any(target_os = "linux", target_os = "macos"))'.dependencies.tikv-jemalloc-sys] -version = "0.6.0" -features = ['unprefixed_malloc_on_supported_platforms'] +[target.'cfg(all(target_os = "linux", target_arch = "x86_64"))'.dependencies] +libtcmalloc-sys = { git = "https://github.com/0xdeafbeef/tcmalloc-better.git", rev = "781a440a0919", default-features = false, features = ["unprefixed_malloc_on_supported_platforms", "32k_pages", "override_cpp_operators"] } [target.'cfg(unix)'.dependencies] libc = "0.2" diff --git a/src/tools/miri/src/bin/miri.rs b/src/tools/miri/src/bin/miri.rs index 8b15a7863476e..e74c9817ea6b4 100644 --- a/src/tools/miri/src/bin/miri.rs +++ b/src/tools/miri/src/bin/miri.rs @@ -397,47 +397,47 @@ fn parse_range(val: &str) -> Result, &'static str> { Ok(from..to) } -#[cfg(any(target_os = "linux", target_os = "macos"))] -fn jemalloc_magic() { +#[cfg(all(target_os = "linux", target_arch = "x86_64"))] +fn tcmalloc_magic() { // These magic runes are copied from // . // See there for further comments. use std::os::raw::{c_int, c_void}; - use tikv_jemalloc_sys as jemalloc_sys; + extern "C" { + fn calloc(count: usize, size: usize) -> *mut c_void; + fn posix_memalign(ptr: *mut *mut c_void, alignment: usize, size: usize) -> c_int; + fn aligned_alloc(alignment: usize, size: usize) -> *mut c_void; + fn malloc(size: usize) -> *mut c_void; + fn realloc(ptr: *mut c_void, size: usize) -> *mut c_void; + fn free(ptr: *mut c_void); + } #[used] - static _F1: unsafe extern "C" fn(usize, usize) -> *mut c_void = jemalloc_sys::calloc; + static _TCMALLOC_BRIDGE_ALLOC: unsafe extern "C" fn(usize, usize) -> *mut c_void = + libtcmalloc_sys::BridgeTCMallocInternalNewAlignedNothrow; #[used] - static _F2: unsafe extern "C" fn(*mut *mut c_void, usize, usize) -> c_int = - jemalloc_sys::posix_memalign; + static _TCMALLOC_BRIDGE_DELETE_ALIGNED: unsafe extern "C" fn(*mut c_void, usize) = + libtcmalloc_sys::TCMallocInternalDeleteAligned; + #[used] - static _F3: unsafe extern "C" fn(usize, usize) -> *mut c_void = jemalloc_sys::aligned_alloc; + static _TCMALLOC_CALLOC: unsafe extern "C" fn(usize, usize) -> *mut c_void = calloc; #[used] - static _F4: unsafe extern "C" fn(usize) -> *mut c_void = jemalloc_sys::malloc; + static _TCMALLOC_POSIX_MEMALIGN: unsafe extern "C" fn(*mut *mut c_void, usize, usize) -> c_int = + posix_memalign; #[used] - static _F5: unsafe extern "C" fn(*mut c_void, usize) -> *mut c_void = jemalloc_sys::realloc; + static _TCMALLOC_ALIGNED_ALLOC: unsafe extern "C" fn(usize, usize) -> *mut c_void = aligned_alloc; #[used] - static _F6: unsafe extern "C" fn(*mut c_void) = jemalloc_sys::free; - - // On OSX, jemalloc doesn't directly override malloc/free, but instead - // registers itself with the allocator's zone APIs in a ctor. However, - // the linker doesn't seem to consider ctors as "used" when statically - // linking, so we need to explicitly depend on the function. - #[cfg(target_os = "macos")] - { - unsafe extern "C" { - fn _rjem_je_zone_register(); - } - - #[used] - static _F7: unsafe extern "C" fn() = _rjem_je_zone_register; - } + static _TCMALLOC_MALLOC: unsafe extern "C" fn(usize) -> *mut c_void = malloc; + #[used] + static _TCMALLOC_REALLOC: unsafe extern "C" fn(*mut c_void, usize) -> *mut c_void = realloc; + #[used] + static _TCMALLOC_FREE: unsafe extern "C" fn(*mut c_void) = free; } fn main() { - #[cfg(any(target_os = "linux", target_os = "macos"))] - jemalloc_magic(); + #[cfg(all(target_os = "linux", target_arch = "x86_64"))] + tcmalloc_magic(); let early_dcx = EarlyDiagCtxt::new(ErrorOutputType::default()); diff --git a/src/tools/rustdoc/Cargo.toml b/src/tools/rustdoc/Cargo.toml index d1682758d3626..ffc56ec01759f 100644 --- a/src/tools/rustdoc/Cargo.toml +++ b/src/tools/rustdoc/Cargo.toml @@ -10,8 +10,8 @@ edition = "2024" name = "rustdoc_tool_binary" path = "main.rs" +[features] +jemalloc = [] + [dependencies] rustdoc = { path = "../../librustdoc" } - -[features] -jemalloc = ['rustdoc/jemalloc']