2
2
3
3
use std:: { fmt, str:: FromStr } ;
4
4
5
- use crate :: install:: { ClientOpt , ServerOpt } ;
5
+ use crate :: install:: { ClientOpt , ProcMacroServerOpt , ServerOpt } ;
6
6
7
7
xflags:: xflags! {
8
8
src "./src/flags.rs"
@@ -23,6 +23,10 @@ xflags::xflags! {
23
23
optional --mimalloc
24
24
/// Use jemalloc allocator for server.
25
25
optional --jemalloc
26
+
27
+ /// Install the proc-macro server.
28
+ optional --proc-macro-server
29
+
26
30
/// build in release with debug info set to 2.
27
31
optional --dev-rel
28
32
}
@@ -109,6 +113,7 @@ pub struct Install {
109
113
pub client : bool ,
110
114
pub code_bin : Option < String > ,
111
115
pub server : bool ,
116
+ pub proc_macro_server : bool ,
112
117
pub mimalloc : bool ,
113
118
pub jemalloc : bool ,
114
119
pub dev_rel : bool ,
@@ -284,7 +289,7 @@ impl Malloc {
284
289
285
290
impl Install {
286
291
pub ( crate ) fn server ( & self ) -> Option < ServerOpt > {
287
- if self . client && !self . server {
292
+ if !self . server {
288
293
return None ;
289
294
}
290
295
let malloc = if self . mimalloc {
@@ -296,8 +301,14 @@ impl Install {
296
301
} ;
297
302
Some ( ServerOpt { malloc, dev_rel : self . dev_rel } )
298
303
}
304
+ pub ( crate ) fn proc_macro_server ( & self ) -> Option < ProcMacroServerOpt > {
305
+ if !self . proc_macro_server {
306
+ return None ;
307
+ }
308
+ Some ( ProcMacroServerOpt { dev_rel : self . dev_rel } )
309
+ }
299
310
pub ( crate ) fn client ( & self ) -> Option < ClientOpt > {
300
- if !self . client && self . server {
311
+ if !self . client {
301
312
return None ;
302
313
}
303
314
Some ( ClientOpt { code_bin : self . code_bin . clone ( ) } )
0 commit comments