From deed44a472edaf11d35fa98c7e68a288f8dfe93f Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 22 Jul 2020 13:40:45 +0200 Subject: Remove support for jemalloc We only used it for measuring memory usage, but now we can use glibc's allocator for that just fine --- xtask/src/dist.rs | 2 -- xtask/src/install.rs | 2 -- xtask/src/main.rs | 12 ++---------- 3 files changed, 2 insertions(+), 14 deletions(-) (limited to 'xtask') diff --git a/xtask/src/dist.rs b/xtask/src/dist.rs index b8f68027c..c198c0907 100644 --- a/xtask/src/dist.rs +++ b/xtask/src/dist.rs @@ -57,8 +57,6 @@ fn dist_server() -> Result<()> { env::set_var("CC", "clang"); run!( "cargo build --manifest-path ./crates/rust-analyzer/Cargo.toml --bin rust-analyzer --release" - // We'd want to add, but that requires setting the right linker somehow - // --features=jemalloc )?; } else { run!("cargo build --manifest-path ./crates/rust-analyzer/Cargo.toml --bin rust-analyzer --release")?; diff --git a/xtask/src/install.rs b/xtask/src/install.rs index a0dc0c9c2..b25a6e301 100644 --- a/xtask/src/install.rs +++ b/xtask/src/install.rs @@ -24,7 +24,6 @@ pub struct ServerOpt { pub enum Malloc { System, - Jemalloc, Mimalloc, } @@ -138,7 +137,6 @@ fn install_server(opts: ServerOpt) -> Result<()> { let malloc_feature = match opts.malloc { Malloc::System => "", - Malloc::Jemalloc => "--features jemalloc", Malloc::Mimalloc => "--features mimalloc", }; let res = run!("cargo install --path crates/rust-analyzer --locked --force {}", malloc_feature); diff --git a/xtask/src/main.rs b/xtask/src/main.rs index 399ff7204..53d3ce3e7 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -45,7 +45,6 @@ USAGE: FLAGS: --client-code Install only VS Code plugin --server Install only the language server - --jemalloc Use jemalloc for server --mimalloc Use mimalloc for server -h, --help Prints help information " @@ -62,15 +61,8 @@ FLAGS: return Ok(()); } - let malloc = match (args.contains("--jemalloc"), args.contains("--mimalloc")) { - (false, false) => Malloc::System, - (true, false) => Malloc::Jemalloc, - (false, true) => Malloc::Mimalloc, - (true, true) => { - eprintln!("error: Cannot use both `--jemalloc` and `--mimalloc`"); - return Ok(()); - } - }; + let malloc = + if args.contains("--mimalloc") { Malloc::Mimalloc } else { Malloc::System }; args.finish()?; -- cgit v1.2.3