mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
refactor cli/src/build.rs
This commit is contained in:
parent
a2c760aa56
commit
1995d8b3df
5 changed files with 235 additions and 156 deletions
|
@ -24,6 +24,22 @@ impl OperatingSystem {
|
|||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
pub const fn object_file_ext(&self) -> &str {
|
||||
match self {
|
||||
OperatingSystem::Windows => "obj",
|
||||
OperatingSystem::Unix => "o",
|
||||
OperatingSystem::Wasi => "o",
|
||||
}
|
||||
}
|
||||
|
||||
pub const fn executable_file_ext(&self) -> Option<&str> {
|
||||
match self {
|
||||
OperatingSystem::Windows => Some("exe"),
|
||||
OperatingSystem::Unix => None,
|
||||
OperatingSystem::Wasi => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<target_lexicon::OperatingSystem> for OperatingSystem {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue