Skip to content

Commit 9b09b42

Browse files
committed
feat: added format argument
1 parent 2ebccbc commit 9b09b42

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

  • compiler/compiler_main/src

compiler/compiler_main/src/cli.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,17 @@ pub enum IRLayer {
1818
MIR,
1919
}
2020

21+
#[derive(Clone, Copy, PartialEq, Eq, ValueEnum, Debug)]
22+
pub enum OutputFormat {
23+
#[value(alias = "exec")]
24+
Executable,
25+
26+
#[value(alias = "o")]
27+
Object,
28+
29+
IR,
30+
}
31+
2132
#[derive(Subcommand)]
2233
pub enum CLICommand {
2334
#[command(visible_alias = "b", about = "Builds the given file(s)")]
@@ -28,6 +39,9 @@ pub enum CLICommand {
2839
#[arg(long, value_enum, default_value = "llvm")]
2940
platform: Platform,
3041

42+
#[arg(short = 't', value_enum, long, default_value = "o")]
43+
format: OutputFormat,
44+
3145
#[arg(short = 'l', default_value = "ld")]
3246
linker: String,
3347

0 commit comments

Comments
 (0)