mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 22:09:09 +00:00
Merge pull request #3888 from roc-lang/windows-cross-compilation
windows cross compilation
This commit is contained in:
commit
7e3a10906c
7 changed files with 64 additions and 31 deletions
|
@ -1111,6 +1111,7 @@ pub enum Target {
|
|||
System,
|
||||
Linux32,
|
||||
Linux64,
|
||||
Windows64,
|
||||
Wasm32,
|
||||
}
|
||||
|
||||
|
@ -1128,6 +1129,7 @@ impl Target {
|
|||
System => "system",
|
||||
Linux32 => "linux32",
|
||||
Linux64 => "linux64",
|
||||
Windows64 => "windows64",
|
||||
Wasm32 => "wasm32",
|
||||
}
|
||||
}
|
||||
|
@ -1137,6 +1139,7 @@ impl Target {
|
|||
Target::System.as_str(),
|
||||
Target::Linux32.as_str(),
|
||||
Target::Linux64.as_str(),
|
||||
Target::Windows64.as_str(),
|
||||
Target::Wasm32.as_str(),
|
||||
];
|
||||
|
||||
|
@ -1159,6 +1162,13 @@ impl Target {
|
|||
environment: Environment::Musl,
|
||||
binary_format: BinaryFormat::Elf,
|
||||
},
|
||||
Windows64 => Triple {
|
||||
architecture: Architecture::X86_64,
|
||||
vendor: Vendor::Unknown,
|
||||
operating_system: OperatingSystem::Windows,
|
||||
environment: Environment::Gnu,
|
||||
binary_format: BinaryFormat::Coff,
|
||||
},
|
||||
Wasm32 => Triple {
|
||||
architecture: Architecture::Wasm32,
|
||||
vendor: Vendor::Unknown,
|
||||
|
@ -1190,6 +1200,7 @@ impl std::str::FromStr for Target {
|
|||
"system" => Ok(Target::System),
|
||||
"linux32" => Ok(Target::Linux32),
|
||||
"linux64" => Ok(Target::Linux64),
|
||||
"windows64" => Ok(Target::Windows64),
|
||||
"wasm32" => Ok(Target::Wasm32),
|
||||
_ => Err(format!("Roc does not know how to compile to {}", string)),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue