Update to target_lexicon 0.2.0.
This commit is contained in:
@@ -33,7 +33,7 @@ serde = "1.0.8"
|
|||||||
term = "0.5.1"
|
term = "0.5.1"
|
||||||
capstone = { version = "0.5.0", optional = true }
|
capstone = { version = "0.5.0", optional = true }
|
||||||
wabt = { version = "0.7.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"
|
pretty_env_logger = "0.2.4"
|
||||||
file-per-thread-logger = "0.1.1"
|
file-per-thread-logger = "0.1.1"
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ libfuzzer-sys = { git = "https://github.com/rust-fuzz/libfuzzer-sys.git" }
|
|||||||
cranelift-codegen = { path = "../lib/codegen" }
|
cranelift-codegen = { path = "../lib/codegen" }
|
||||||
cranelift-wasm = { path = "../lib/wasm" }
|
cranelift-wasm = { path = "../lib/wasm" }
|
||||||
cranelift-reader = { path = "../lib/reader" }
|
cranelift-reader = { path = "../lib/reader" }
|
||||||
target-lexicon = "0.0.3"
|
target-lexicon = "0.2.0"
|
||||||
|
|
||||||
# Prevent this from interfering with workspaces
|
# Prevent this from interfering with workspaces
|
||||||
[workspace]
|
[workspace]
|
||||||
|
|||||||
@@ -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 = { version = "0.1.1", default-features = false, features = ["derive"] }
|
||||||
failure_derive = { version = "0.1.1", default-features = false }
|
failure_derive = { version = "0.1.1", default-features = false }
|
||||||
hashmap_core = { version = "0.1.9", optional = true }
|
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 }
|
log = { version = "0.4.4", default-features = false }
|
||||||
# It is a goal of the cranelift-codegen crate to have minimal external dependencies.
|
# 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
|
# Please don't add any unless they are essential to the task of creating binary
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::str;
|
use std::str;
|
||||||
use target_lexicon::{OperatingSystem, Triple};
|
use target_lexicon::{CallingConvention, Triple};
|
||||||
|
|
||||||
/// Calling convention identifiers.
|
/// Calling convention identifiers.
|
||||||
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
|
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
|
||||||
@@ -22,25 +22,11 @@ pub enum CallConv {
|
|||||||
impl CallConv {
|
impl CallConv {
|
||||||
/// Return the default calling convention for the given target triple.
|
/// Return the default calling convention for the given target triple.
|
||||||
pub fn default_for_triple(triple: &Triple) -> Self {
|
pub fn default_for_triple(triple: &Triple) -> Self {
|
||||||
match triple.operating_system {
|
match triple.default_calling_convention() {
|
||||||
OperatingSystem::Unknown
|
// Default to System V for unknown targets because most everything
|
||||||
| OperatingSystem::Bitrig
|
// uses System V.
|
||||||
| OperatingSystem::Cloudabi
|
Ok(CallingConvention::SystemV) | Err(()) => CallConv::SystemV,
|
||||||
| OperatingSystem::Darwin
|
Ok(CallingConvention::WindowsFastcall) => CallConv::WindowsFastcall,
|
||||||
| 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),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,10 +11,10 @@ readme = "README.md"
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
cranelift-codegen = { path = "../codegen", version = "0.22.0" }
|
cranelift-codegen = { path = "../codegen", version = "0.22.0" }
|
||||||
cranelift-module = { path = "../module", version = "0.22.0" }
|
cranelift-module = { path = "../module", version = "0.22.0" }
|
||||||
faerie = "0.5.0"
|
faerie = "0.6.0"
|
||||||
goblin = "0.0.19"
|
goblin = "0.0.19"
|
||||||
failure = "0.1.2"
|
failure = "0.1.2"
|
||||||
target-lexicon = "0.0.3"
|
target-lexicon = "0.2.0"
|
||||||
|
|
||||||
[badges]
|
[badges]
|
||||||
maintenance = { status = "experimental" }
|
maintenance = { status = "experimental" }
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ readme = "README.md"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
cranelift-codegen = { path = "../codegen", version = "0.22.0", default-features = false }
|
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 }
|
log = { version = "0.4.4", default-features = false }
|
||||||
hashmap_core = { version = "0.1.9", optional = true }
|
hashmap_core = { version = "0.1.9", optional = true }
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ readme = "README.md"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
cranelift-codegen = { path = "../codegen", version = "0.22.0", default-features = false }
|
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]
|
[target.'cfg(any(target_arch = "x86", target_arch = "x86_64"))'.dependencies]
|
||||||
raw-cpuid = "6.0.0"
|
raw-cpuid = "6.0.0"
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ readme = "README.md"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
cranelift-codegen = { path = "../codegen", version = "0.22.0" }
|
cranelift-codegen = { path = "../codegen", version = "0.22.0" }
|
||||||
target-lexicon = "0.0.3"
|
target-lexicon = "0.2.0"
|
||||||
|
|
||||||
[badges]
|
[badges]
|
||||||
maintenance = { status = "experimental" }
|
maintenance = { status = "experimental" }
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ cranelift-native = { path = "../native", version = "0.22.0", default-features =
|
|||||||
region = "1.0.0"
|
region = "1.0.0"
|
||||||
libc = { version = "0.2.42", default-features = false }
|
libc = { version = "0.2.42", default-features = false }
|
||||||
errno = "0.2.4"
|
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]
|
[target.'cfg(target_os = "windows")'.dependencies]
|
||||||
winapi = { version = "0.3", features = ["winbase", "memoryapi"] }
|
winapi = { version = "0.3", features = ["winbase", "memoryapi"] }
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ log = { version = "0.4.4", default-features = false }
|
|||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
wabt = "0.7.0"
|
wabt = "0.7.0"
|
||||||
target-lexicon = "0.0.3"
|
target-lexicon = "0.2.0"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["std"]
|
default = ["std"]
|
||||||
|
|||||||
Reference in New Issue
Block a user