Update to target_lexicon 0.2.0.

This commit is contained in:
Dan Gohman
2018-11-07 14:25:03 -08:00
parent 3409af7c07
commit b476f823d4
10 changed files with 16 additions and 30 deletions

View File

@@ -33,7 +33,7 @@ serde = "1.0.8"
term = "0.5.1"
capstone = { version = "0.5.0", optional = true }
wabt = { version = "0.7.0", optional = true }
target-lexicon = "0.0.3"
target-lexicon = "0.2.0"
pretty_env_logger = "0.2.4"
file-per-thread-logger = "0.1.1"

View File

@@ -14,7 +14,7 @@ libfuzzer-sys = { git = "https://github.com/rust-fuzz/libfuzzer-sys.git" }
cranelift-codegen = { path = "../lib/codegen" }
cranelift-wasm = { path = "../lib/wasm" }
cranelift-reader = { path = "../lib/reader" }
target-lexicon = "0.0.3"
target-lexicon = "0.2.0"
# Prevent this from interfering with workspaces
[workspace]

View File

@@ -17,7 +17,7 @@ cranelift-bforest = { path = "../bforest", version = "0.22.0", default-features
failure = { version = "0.1.1", default-features = false, features = ["derive"] }
failure_derive = { version = "0.1.1", default-features = false }
hashmap_core = { version = "0.1.9", optional = true }
target-lexicon = { version = "0.0.3", default-features = false }
target-lexicon = { version = "0.2.0", default-features = false }
log = { version = "0.4.4", default-features = false }
# It is a goal of the cranelift-codegen crate to have minimal external dependencies.
# Please don't add any unless they are essential to the task of creating binary

View File

@@ -1,6 +1,6 @@
use std::fmt;
use std::str;
use target_lexicon::{OperatingSystem, Triple};
use target_lexicon::{CallingConvention, Triple};
/// Calling convention identifiers.
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
@@ -22,25 +22,11 @@ pub enum CallConv {
impl CallConv {
/// Return the default calling convention for the given target triple.
pub fn default_for_triple(triple: &Triple) -> Self {
match triple.operating_system {
OperatingSystem::Unknown
| OperatingSystem::Bitrig
| OperatingSystem::Cloudabi
| OperatingSystem::Darwin
| OperatingSystem::Dragonfly
| OperatingSystem::Freebsd
| OperatingSystem::Fuchsia
| OperatingSystem::Haiku
| OperatingSystem::Ios
| OperatingSystem::L4re
| OperatingSystem::Linux
| OperatingSystem::Nebulet
| OperatingSystem::Netbsd
| OperatingSystem::Openbsd
| OperatingSystem::Redox
| OperatingSystem::Solaris => CallConv::SystemV,
OperatingSystem::Windows => CallConv::WindowsFastcall,
os => panic!("unsupported operating system: {}", os),
match triple.default_calling_convention() {
// Default to System V for unknown targets because most everything
// uses System V.
Ok(CallingConvention::SystemV) | Err(()) => CallConv::SystemV,
Ok(CallingConvention::WindowsFastcall) => CallConv::WindowsFastcall,
}
}
}

View File

@@ -11,10 +11,10 @@ readme = "README.md"
[dependencies]
cranelift-codegen = { path = "../codegen", version = "0.22.0" }
cranelift-module = { path = "../module", version = "0.22.0" }
faerie = "0.5.0"
faerie = "0.6.0"
goblin = "0.0.19"
failure = "0.1.2"
target-lexicon = "0.0.3"
target-lexicon = "0.2.0"
[badges]
maintenance = { status = "experimental" }

View File

@@ -11,7 +11,7 @@ readme = "README.md"
[dependencies]
cranelift-codegen = { path = "../codegen", version = "0.22.0", default-features = false }
target-lexicon = { version = "0.0.3", default-features = false }
target-lexicon = { version = "0.2.0", default-features = false }
log = { version = "0.4.4", default-features = false }
hashmap_core = { version = "0.1.9", optional = true }

View File

@@ -10,7 +10,7 @@ readme = "README.md"
[dependencies]
cranelift-codegen = { path = "../codegen", version = "0.22.0", default-features = false }
target-lexicon = { version = "0.0.3", default-features = false }
target-lexicon = { version = "0.2.0", default-features = false }
[target.'cfg(any(target_arch = "x86", target_arch = "x86_64"))'.dependencies]
raw-cpuid = "6.0.0"

View File

@@ -10,7 +10,7 @@ readme = "README.md"
[dependencies]
cranelift-codegen = { path = "../codegen", version = "0.22.0" }
target-lexicon = "0.0.3"
target-lexicon = "0.2.0"
[badges]
maintenance = { status = "experimental" }

View File

@@ -16,7 +16,7 @@ cranelift-native = { path = "../native", version = "0.22.0", default-features =
region = "1.0.0"
libc = { version = "0.2.42", default-features = false }
errno = "0.2.4"
target-lexicon = { version = "0.0.3", default-features = false }
target-lexicon = { version = "0.2.0", default-features = false }
[target.'cfg(target_os = "windows")'.dependencies]
winapi = { version = "0.3", features = ["winbase", "memoryapi"] }

View File

@@ -21,7 +21,7 @@ log = { version = "0.4.4", default-features = false }
[dev-dependencies]
wabt = "0.7.0"
target-lexicon = "0.0.3"
target-lexicon = "0.2.0"
[features]
default = ["std"]