File tree Expand file tree Collapse file tree 5 files changed +15
-12
lines changed Expand file tree Collapse file tree 5 files changed +15
-12
lines changed Original file line number Diff line number Diff line change @@ -600,7 +600,6 @@ dependencies = [
600600 " serde_json" ,
601601 " tempfile" ,
602602 " termize" ,
603- " tikv-jemalloc-sys" ,
604603 " toml 0.9.7" ,
605604 " ui_test" ,
606605 " walkdir" ,
@@ -4807,7 +4806,6 @@ dependencies = [
48074806 " stringdex" ,
48084807 " tempfile" ,
48094808 " threadpool" ,
4810- " tikv-jemalloc-sys" ,
48114809 " tracing" ,
48124810 " tracing-subscriber" ,
48134811 " tracing-tree" ,
Original file line number Diff line number Diff line change @@ -24,7 +24,6 @@ smallvec = "1.8.1"
2424stringdex = " =0.0.3"
2525tempfile = " 3"
2626threadpool = " 1.8.1"
27- tikv-jemalloc-sys = { version = " 0.6.1" , optional = true , features = [' override_allocator_on_supported_platforms' ] }
2827tracing = " 0.1"
2928tracing-tree = " 0.3.0"
3029unicode-segmentation = " 1.9"
@@ -43,7 +42,7 @@ minifier = { version = "0.3.2", default-features = false }
4342expect-test = " 1.4.0"
4443
4544[features ]
46- jemalloc = [" dep:tikv-jemalloc-sys " ]
45+ jemalloc = []
4746
4847[package .metadata .rust-analyzer ]
4948rustc_private = true
Original file line number Diff line number Diff line change @@ -61,6 +61,14 @@ extern crate rustc_target;
6161extern crate rustc_trait_selection;
6262extern crate test;
6363
64+ /// See docs in https://github.com/rust-lang/rust/blob/HEAD/compiler/rustc/src/main.rs
65+ /// and https://github.com/rust-lang/rust/pull/146627 for why we need this.
66+ ///
67+ /// NOTE: This is loaded from the sysroot that was built with the other `rustc` crates above, for
68+ /// some unknown reason this is more performant than building this with Cargo.
69+ #[ cfg( feature = "jemalloc" ) ]
70+ extern crate tikv_jemalloc_sys as _;
71+
6472use std:: env:: { self , VarError } ;
6573use std:: io:: { self , IsTerminal } ;
6674use std:: path:: Path ;
@@ -72,10 +80,6 @@ use rustc_interface::interface;
7280use rustc_middle:: ty:: TyCtxt ;
7381use rustc_session:: config:: { ErrorOutputType , RustcOptGroup , make_crate_type_option} ;
7482use rustc_session:: { EarlyDiagCtxt , getopts} ;
75- /// See docs in https://github.com/rust-lang/rust/blob/HEAD/compiler/rustc/src/main.rs
76- /// and https://github.com/rust-lang/rust/pull/146627 for why we need this `use` statement.
77- #[ cfg( feature = "jemalloc" ) ]
78- use tikv_jemalloc_sys as _;
7983use tracing:: info;
8084
8185use crate :: clean:: utils:: DOC_RUST_LANG_ORG_VERSION ;
Original file line number Diff line number Diff line change @@ -31,7 +31,6 @@ tempfile = { version = "3.20", optional = true }
3131termize = " 0.2"
3232color-print = " 0.3.4"
3333anstream = " 0.6.18"
34- tikv-jemalloc-sys = { version = " 0.6.1" , optional = true , features = [' override_allocator_on_supported_platforms' ] }
3534
3635[dev-dependencies ]
3736cargo_metadata = " 0.18.1"
@@ -57,7 +56,7 @@ rustc_tools_util = { path = "rustc_tools_util", version = "0.4.2" }
5756[features ]
5857integration = [" dep:tempfile" ]
5958internal = [" dep:clippy_lints_internal" , " dep:tempfile" ]
60- jemalloc = [" dep:tikv-jemalloc-sys " ]
59+ jemalloc = []
6160
6261[package .metadata .rust-analyzer ]
6362# This package uses #[feature(rustc_private)]
Original file line number Diff line number Diff line change @@ -14,9 +14,12 @@ extern crate rustc_session;
1414extern crate rustc_span;
1515
1616/// See docs in https://github.com/rust-lang/rust/blob/HEAD/compiler/rustc/src/main.rs
17- /// and https://github.com/rust-lang/rust/pull/146627 for why we need this `use` statement.
17+ /// and https://github.com/rust-lang/rust/pull/146627 for why we need this.
18+ ///
19+ /// NOTE: This is loaded from the sysroot that was built with the other `rustc` crates above, for
20+ /// some unknown reason this is more performant than building this with Cargo.
1821#[ cfg( feature = "jemalloc" ) ]
19- use tikv_jemalloc_sys as _;
22+ extern crate tikv_jemalloc_sys as _;
2023
2124use clippy_utils:: sym;
2225use declare_clippy_lint:: LintListBuilder ;
You can’t perform that action at this time.
0 commit comments