mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 04:08:19 +00:00
WIP
WIP WIP WIP ignore some cli tests that are going to move try fix for linux valgrind tests try a legacy host for valgrind fix roc_glue tests
This commit is contained in:
parent
b9a17f4a49
commit
dc0902bc92
12 changed files with 350 additions and 327 deletions
|
@ -17,6 +17,18 @@ pub enum OperatingSystem {
|
|||
Windows,
|
||||
}
|
||||
|
||||
impl std::fmt::Display for OperatingSystem {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
||||
let arch_str = match self {
|
||||
OperatingSystem::Freestanding => "freestanding",
|
||||
OperatingSystem::Linux => "linux",
|
||||
OperatingSystem::Mac => "macos",
|
||||
OperatingSystem::Windows => "windows",
|
||||
};
|
||||
write!(f, "{}", arch_str)
|
||||
}
|
||||
}
|
||||
|
||||
#[repr(u8)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum PtrWidth {
|
||||
|
@ -36,8 +48,8 @@ pub enum Architecture {
|
|||
impl std::fmt::Display for Architecture {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
||||
let arch_str = match self {
|
||||
Architecture::Aarch32 => "aarch32",
|
||||
Architecture::Aarch64 => "aarch64",
|
||||
Architecture::Aarch32 => "arm",
|
||||
Architecture::Aarch64 => "arm64",
|
||||
Architecture::Wasm32 => "wasm32",
|
||||
Architecture::X86_32 => "x86_32",
|
||||
Architecture::X86_64 => "x86_64",
|
||||
|
@ -148,6 +160,34 @@ impl Target {
|
|||
Wasm32 => Some("wasm"),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn prebuilt_static_object(&self) -> String {
|
||||
use Target::*;
|
||||
match self {
|
||||
LinuxX32 | LinuxX64 | LinuxArm64 | MacX64 | MacArm64 | Wasm32 => {
|
||||
format!("{}-{}.o", self.operating_system(), self.architecture())
|
||||
}
|
||||
WinX32 | WinX64 | WinArm64 => {
|
||||
format!("{}-{}.obj", self.operating_system(), self.architecture())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn prebuilt_static_library(&self) -> String {
|
||||
use Target::*;
|
||||
match self {
|
||||
LinuxX32 | LinuxX64 | LinuxArm64 | MacX64 | MacArm64 | Wasm32 => {
|
||||
format!("{}-{}.a", self.operating_system(), self.architecture())
|
||||
}
|
||||
WinX32 | WinX64 | WinArm64 => {
|
||||
format!("{}-{}.lib", self.operating_system(), self.architecture())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn prebuilt_surgical_host(&self) -> String {
|
||||
format!("{}-{}.rh", self.operating_system(), self.architecture())
|
||||
}
|
||||
}
|
||||
|
||||
pub enum ParseError {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue