diff options
Diffstat (limited to 'xtask/src/flags.rs')
-rw-r--r-- | xtask/src/flags.rs | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/xtask/src/flags.rs b/xtask/src/flags.rs index 56eda5b1e..48d1ad45e 100644 --- a/xtask/src/flags.rs +++ b/xtask/src/flags.rs | |||
@@ -2,7 +2,9 @@ | |||
2 | 2 | ||
3 | use crate::install::{ClientOpt, Malloc, ServerOpt}; | 3 | use crate::install::{ClientOpt, Malloc, ServerOpt}; |
4 | 4 | ||
5 | xflags::args_parser! { | 5 | xflags::xflags! { |
6 | src "./src/flags.rs" | ||
7 | |||
6 | /// Run custom build command. | 8 | /// Run custom build command. |
7 | cmd xtask { | 9 | cmd xtask { |
8 | default cmd help { | 10 | default cmd help { |
@@ -25,10 +27,6 @@ xflags::args_parser! { | |||
25 | optional --jemalloc | 27 | optional --jemalloc |
26 | } | 28 | } |
27 | 29 | ||
28 | cmd codegen { | ||
29 | optional --features | ||
30 | } | ||
31 | |||
32 | cmd lint {} | 30 | cmd lint {} |
33 | cmd fuzz-tests {} | 31 | cmd fuzz-tests {} |
34 | cmd pre-cache {} | 32 | cmd pre-cache {} |
@@ -55,7 +53,7 @@ xflags::args_parser! { | |||
55 | 53 | ||
56 | // generated start | 54 | // generated start |
57 | // The following code is generated by `xflags` macro. | 55 | // The following code is generated by `xflags` macro. |
58 | // Run `env XFLAGS_DUMP= cargo build` to regenerate. | 56 | // Run `env UPDATE_XFLAGS=1 cargo build` to regenerate. |
59 | #[derive(Debug)] | 57 | #[derive(Debug)] |
60 | pub struct Xtask { | 58 | pub struct Xtask { |
61 | pub subcommand: XtaskCmd, | 59 | pub subcommand: XtaskCmd, |
@@ -65,7 +63,6 @@ pub struct Xtask { | |||
65 | pub enum XtaskCmd { | 63 | pub enum XtaskCmd { |
66 | Help(Help), | 64 | Help(Help), |
67 | Install(Install), | 65 | Install(Install), |
68 | Codegen(Codegen), | ||
69 | Lint(Lint), | 66 | Lint(Lint), |
70 | FuzzTests(FuzzTests), | 67 | FuzzTests(FuzzTests), |
71 | PreCache(PreCache), | 68 | PreCache(PreCache), |
@@ -91,18 +88,13 @@ pub struct Install { | |||
91 | } | 88 | } |
92 | 89 | ||
93 | #[derive(Debug)] | 90 | #[derive(Debug)] |
94 | pub struct Codegen { | 91 | pub struct Lint; |
95 | pub features: bool, | ||
96 | } | ||
97 | |||
98 | #[derive(Debug)] | ||
99 | pub struct Lint {} | ||
100 | 92 | ||
101 | #[derive(Debug)] | 93 | #[derive(Debug)] |
102 | pub struct FuzzTests {} | 94 | pub struct FuzzTests; |
103 | 95 | ||
104 | #[derive(Debug)] | 96 | #[derive(Debug)] |
105 | pub struct PreCache {} | 97 | pub struct PreCache; |
106 | 98 | ||
107 | #[derive(Debug)] | 99 | #[derive(Debug)] |
108 | pub struct Release { | 100 | pub struct Release { |
@@ -131,11 +123,10 @@ pub struct Bb { | |||
131 | } | 123 | } |
132 | 124 | ||
133 | impl Xtask { | 125 | impl Xtask { |
134 | pub const HELP: &'static str = Self::_HELP; | 126 | pub const HELP: &'static str = Self::HELP_; |
135 | 127 | ||
136 | pub fn from_env() -> xflags::Result<Self> { | 128 | pub fn from_env() -> xflags::Result<Self> { |
137 | let mut p = xflags::rt::Parser::new_from_env(); | 129 | Self::from_env_() |
138 | Self::_parse(&mut p) | ||
139 | } | 130 | } |
140 | } | 131 | } |
141 | // generated end | 132 | // generated end |