aboutsummaryrefslogtreecommitdiff
path: root/xtask/src/main.rs
diff options
context:
space:
mode:
authorJonas Schievink <[email protected]>2021-01-18 18:25:55 +0000
committerJonas Schievink <[email protected]>2021-01-18 18:39:46 +0000
commit9b5fa1c61a85972da419aa29d61286cb9e268f83 (patch)
tree29704f0e4140261ed68bb5ea3cf52e7385bfc997 /xtask/src/main.rs
parent6764d790ac904533dc7618fd38724a135499f87c (diff)
Add back jemalloc support
Diffstat (limited to 'xtask/src/main.rs')
-rw-r--r--xtask/src/main.rs12
1 files changed, 9 insertions, 3 deletions
diff --git a/xtask/src/main.rs b/xtask/src/main.rs
index dec48629c..c3e5c7326 100644
--- a/xtask/src/main.rs
+++ b/xtask/src/main.rs
@@ -49,7 +49,8 @@ FLAGS:
49 --client[=CLIENT] Install only VS Code plugin. 49 --client[=CLIENT] Install only VS Code plugin.
50 CLIENT is one of 'code', 'code-exploration', 'code-insiders', 'codium', or 'code-oss' 50 CLIENT is one of 'code', 'code-exploration', 'code-insiders', 'codium', or 'code-oss'
51 --server Install only the language server 51 --server Install only the language server
52 --mimalloc Use mimalloc for server 52 --mimalloc Use mimalloc allocator for server
53 --jemalloc Use jemalloc allocator for server
53 -h, --help Prints help information 54 -h, --help Prints help information
54 " 55 "
55 ); 56 );
@@ -65,8 +66,13 @@ FLAGS:
65 return Ok(()); 66 return Ok(());
66 } 67 }
67 68
68 let malloc = 69 let malloc = if args.contains("--mimalloc") {
69 if args.contains("--mimalloc") { Malloc::Mimalloc } else { Malloc::System }; 70 Malloc::Mimalloc
71 } else if args.contains("--jemalloc") {
72 Malloc::Jemalloc
73 } else {
74 Malloc::System
75 };
70 76
71 let client_opt = args.opt_value_from_str("--client")?; 77 let client_opt = args.opt_value_from_str("--client")?;
72 78