Skip to content

Commit 813d555

Browse files
committed
feat: renamed platform -> bridge
1 parent 8e25cee commit 813d555

2 files changed

Lines changed: 8 additions & 9 deletions

File tree

compiler/compiler_main/src/cli.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ pub struct Cli {
99
}
1010

1111
#[derive(Clone, Copy, PartialEq, Eq, ValueEnum, Debug)]
12-
pub enum Platform {
12+
pub enum Bridge {
1313
AstoIR,
1414
LLVM,
1515
}
@@ -38,8 +38,8 @@ pub enum CLICommand {
3838
#[arg(short = 'o')]
3939
out: PathBuf,
4040

41-
#[arg(long, value_enum, default_value = "llvm")]
42-
platform: Platform,
41+
#[arg(long, value_enum, default_value = "llvm", short = 'b')]
42+
bridge: Bridge,
4343

4444
#[arg(short = 't', value_enum, long, default_value = "o")]
4545
format: OutputFormat,

compiler/compiler_main/src/main.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
use std::{
22
fs,
33
path::{Path, PathBuf},
4-
process::Output,
54
time::Instant,
65
};
76

87
use clap::Parser;
98

109
use crate::{
11-
cli::{CLICommand, Cli, OutputFormat, Platform},
10+
cli::{Bridge, CLICommand, Cli, OutputFormat},
1211
cmds::{build::build_mir, check::run_check},
1312
version::{GIT_HASH, VERSION},
1413
};
@@ -42,7 +41,7 @@ fn main() {
4241

4342
CLICommand::Build {
4443
out,
45-
platform,
44+
bridge,
4645
format,
4746
linker,
4847
input,
@@ -59,12 +58,12 @@ fn main() {
5958
fs::create_dir_all(out.clone()).unwrap();
6059
}
6160

62-
if platform == Platform::AstoIR && format != OutputFormat::IR {
61+
if bridge == Bridge::AstoIR && format != OutputFormat::IR {
6362
soft_panic!("Only IR target is supported by AstoIR platform!");
6463
}
6564

66-
match platform {
67-
Platform::AstoIR => {
65+
match bridge {
66+
Bridge::AstoIR => {
6867
for i in input {
6968
let mut outfile = PathBuf::from(i.file_name().unwrap());
7069
outfile.add_extension("air");

0 commit comments

Comments
 (0)