diff options
Diffstat (limited to 'xtask')
-rw-r--r-- | xtask/Cargo.toml | 2 | ||||
-rw-r--r-- | xtask/src/ast_src.rs | 1 | ||||
-rw-r--r-- | xtask/src/install.rs | 2 | ||||
-rw-r--r-- | xtask/src/main.rs | 12 |
4 files changed, 13 insertions, 4 deletions
diff --git a/xtask/Cargo.toml b/xtask/Cargo.toml index 1bb9222d7..4abc7b053 100644 --- a/xtask/Cargo.toml +++ b/xtask/Cargo.toml | |||
@@ -15,7 +15,7 @@ flate2 = "1.0" | |||
15 | pico-args = "0.3.1" | 15 | pico-args = "0.3.1" |
16 | proc-macro2 = "1.0.8" | 16 | proc-macro2 = "1.0.8" |
17 | quote = "1.0.2" | 17 | quote = "1.0.2" |
18 | ungrammar = "1.8" | 18 | ungrammar = "1.9" |
19 | walkdir = "2.3.1" | 19 | walkdir = "2.3.1" |
20 | write-json = "0.1.0" | 20 | write-json = "0.1.0" |
21 | xshell = "0.1" | 21 | xshell = "0.1" |
diff --git a/xtask/src/ast_src.rs b/xtask/src/ast_src.rs index 046d68f52..0fd1d13e6 100644 --- a/xtask/src/ast_src.rs +++ b/xtask/src/ast_src.rs | |||
@@ -104,6 +104,7 @@ pub(crate) const KINDS_SRC: KindsSrc = KindsSrc { | |||
104 | "MACRO_DEF", | 104 | "MACRO_DEF", |
105 | "PAREN_TYPE", | 105 | "PAREN_TYPE", |
106 | "TUPLE_TYPE", | 106 | "TUPLE_TYPE", |
107 | "MACRO_TYPE", | ||
107 | "NEVER_TYPE", | 108 | "NEVER_TYPE", |
108 | "PATH_TYPE", | 109 | "PATH_TYPE", |
109 | "PTR_TYPE", | 110 | "PTR_TYPE", |
diff --git a/xtask/src/install.rs b/xtask/src/install.rs index 12962bcfa..202c74426 100644 --- a/xtask/src/install.rs +++ b/xtask/src/install.rs | |||
@@ -67,6 +67,7 @@ pub struct ServerOpt { | |||
67 | pub enum Malloc { | 67 | pub enum Malloc { |
68 | System, | 68 | System, |
69 | Mimalloc, | 69 | Mimalloc, |
70 | Jemalloc, | ||
70 | } | 71 | } |
71 | 72 | ||
72 | impl InstallCmd { | 73 | impl InstallCmd { |
@@ -176,6 +177,7 @@ fn install_server(opts: ServerOpt) -> Result<()> { | |||
176 | let features = match opts.malloc { | 177 | let features = match opts.malloc { |
177 | Malloc::System => &[][..], | 178 | Malloc::System => &[][..], |
178 | Malloc::Mimalloc => &["--features", "mimalloc"], | 179 | Malloc::Mimalloc => &["--features", "mimalloc"], |
180 | Malloc::Jemalloc => &["--features", "jemalloc"], | ||
179 | }; | 181 | }; |
180 | 182 | ||
181 | let cmd = cmd!("cargo install --path crates/rust-analyzer --locked --force {features...}"); | 183 | let cmd = cmd!("cargo install --path crates/rust-analyzer --locked --force {features...}"); |
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 | ||