mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 07:41:12 +00:00
Don't special-case vendors in target strings
This commit is contained in:
parent
9741784604
commit
1c06f3fee1
1 changed files with 1 additions and 15 deletions
|
@ -12,7 +12,7 @@ use roc_mono::ir::{Env, PartialProc, Procs};
|
||||||
use roc_mono::layout::{Layout, LayoutCache};
|
use roc_mono::layout::{Layout, LayoutCache};
|
||||||
use std::collections::HashSet;
|
use std::collections::HashSet;
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
use target_lexicon::{Architecture, OperatingSystem, Triple, Vendor};
|
use target_lexicon::{Architecture, OperatingSystem, Triple};
|
||||||
|
|
||||||
// TODO how should imported modules factor into this? What if those use builtins too?
|
// TODO how should imported modules factor into this? What if those use builtins too?
|
||||||
// TODO this should probably use more helper functions
|
// TODO this should probably use more helper functions
|
||||||
|
@ -334,28 +334,14 @@ pub fn gen(
|
||||||
let target_triple_str = match target {
|
let target_triple_str = match target {
|
||||||
Triple {
|
Triple {
|
||||||
architecture: Architecture::X86_64,
|
architecture: Architecture::X86_64,
|
||||||
vendor: Vendor::Unknown,
|
|
||||||
operating_system: OperatingSystem::Linux,
|
operating_system: OperatingSystem::Linux,
|
||||||
..
|
..
|
||||||
} => "x86_64-unknown-linux-gnu",
|
} => "x86_64-unknown-linux-gnu",
|
||||||
Triple {
|
Triple {
|
||||||
architecture: Architecture::X86_64,
|
architecture: Architecture::X86_64,
|
||||||
vendor: Vendor::Pc,
|
|
||||||
operating_system: OperatingSystem::Linux,
|
|
||||||
..
|
|
||||||
} => "x86_64-pc-linux-gnu",
|
|
||||||
Triple {
|
|
||||||
architecture: Architecture::X86_64,
|
|
||||||
vendor: Vendor::Unknown,
|
|
||||||
operating_system: OperatingSystem::Darwin,
|
operating_system: OperatingSystem::Darwin,
|
||||||
..
|
..
|
||||||
} => "x86_64-unknown-darwin10",
|
} => "x86_64-unknown-darwin10",
|
||||||
Triple {
|
|
||||||
architecture: Architecture::X86_64,
|
|
||||||
vendor: Vendor::Apple,
|
|
||||||
operating_system: OperatingSystem::Darwin,
|
|
||||||
..
|
|
||||||
} => "x86_64-apple-darwin10",
|
|
||||||
_ => 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