mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 22:09:09 +00:00
add preprocess host cli option
This commit is contained in:
parent
f0e3d65bc9
commit
8e86640bd7
3 changed files with 52 additions and 7 deletions
|
@ -48,6 +48,7 @@ pub const CMD_FORMAT: &str = "format";
|
|||
pub const CMD_TEST: &str = "test";
|
||||
pub const CMD_GLUE: &str = "glue";
|
||||
pub const CMD_GEN_STUB_LIB: &str = "gen-stub-lib";
|
||||
pub const CMD_PREPROCESS_HOST: &str = "preprocess-host";
|
||||
|
||||
pub const FLAG_DEBUG: &str = "debug";
|
||||
pub const FLAG_BUNDLE: &str = "bundle";
|
||||
|
@ -345,6 +346,23 @@ pub fn build_app() -> Command {
|
|||
.value_parser(value_parser!(PathBuf))
|
||||
.required(true)
|
||||
)
|
||||
.arg(
|
||||
Arg::new(FLAG_TARGET)
|
||||
.long(FLAG_TARGET)
|
||||
.help("Choose a different target")
|
||||
.default_value(Into::<&'static str>::into(Target::default()))
|
||||
.value_parser(build_target_values_parser.clone())
|
||||
.required(false),
|
||||
)
|
||||
)
|
||||
.subcommand(Command::new(CMD_PREPROCESS_HOST)
|
||||
.about("Runs the surgical linker preprocessor to generate `.rh` and `.rm` files.")
|
||||
.arg(
|
||||
Arg::new(ROC_FILE)
|
||||
.help("The .roc file for an app using the platform")
|
||||
.value_parser(value_parser!(PathBuf))
|
||||
.required(true)
|
||||
)
|
||||
.arg(
|
||||
Arg::new(FLAG_TARGET)
|
||||
.long(FLAG_TARGET)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue