mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 08:11:12 +00:00
Add target triple for Windows
This commit is contained in:
parent
d5116d01b4
commit
68f64835f0
1 changed files with 10 additions and 1 deletions
|
@ -27,7 +27,7 @@ use inkwell::targets::{
|
||||||
use std::io::{self, ErrorKind};
|
use std::io::{self, ErrorKind};
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
use std::process;
|
use std::process;
|
||||||
use target_lexicon::{Architecture, OperatingSystem, Triple, Vendor};
|
use target_lexicon::{Architecture, Environment, OperatingSystem, Triple, Vendor};
|
||||||
use tokio::process::Command;
|
use tokio::process::Command;
|
||||||
use tokio::runtime::Builder;
|
use tokio::runtime::Builder;
|
||||||
|
|
||||||
|
@ -565,6 +565,8 @@ fn gen(
|
||||||
// Best guide I've found on how to determine these magic strings:
|
// Best guide I've found on how to determine these magic strings:
|
||||||
//
|
//
|
||||||
// https://stackoverflow.com/questions/15036909/clang-how-to-list-supported-target-architectures
|
// https://stackoverflow.com/questions/15036909/clang-how-to-list-supported-target-architectures
|
||||||
|
//
|
||||||
|
// Clang docs are particularly helpful: http://clang.llvm.org/docs/CrossCompilation.html
|
||||||
let target_triple_str = match target {
|
let target_triple_str = match target {
|
||||||
Triple {
|
Triple {
|
||||||
architecture: Architecture::X86_64,
|
architecture: Architecture::X86_64,
|
||||||
|
@ -590,6 +592,13 @@ fn gen(
|
||||||
operating_system: OperatingSystem::Darwin,
|
operating_system: OperatingSystem::Darwin,
|
||||||
..
|
..
|
||||||
} => "x86_64-apple-darwin10",
|
} => "x86_64-apple-darwin10",
|
||||||
|
Triple {
|
||||||
|
architecture: Architecture::X86_64,
|
||||||
|
vendor: Vendor::Pc,
|
||||||
|
operating_system: OperatingSystem::Windows,
|
||||||
|
environment: Environment::Msvc,
|
||||||
|
..
|
||||||
|
} => "x86_64-pc-win32-gnu",
|
||||||
_ => panic!("TODO gracefully handle unsupported target: {:?}", target),
|
_ => panic!("TODO gracefully handle unsupported target: {:?}", target),
|
||||||
};
|
};
|
||||||
let target_machine = Target::from_name(arch_str)
|
let target_machine = Target::from_name(arch_str)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue