Update Cranelift

This commit is contained in:
bjorn3 2020-12-12 10:37:10 +01:00
parent 994b91ac73
commit f8e22bfb1b
5 changed files with 52 additions and 52 deletions

88
Cargo.lock generated
View File

@ -50,7 +50,7 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]] [[package]]
name = "cranelift-bforest" name = "cranelift-bforest"
version = "0.68.0" version = "0.68.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#bfd10512c10ef08d1969ab961e88dbbb41a3b201" source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#8f7f8ee0b4c5007ace6de29b45505c360450b1bb"
dependencies = [ dependencies = [
"cranelift-entity", "cranelift-entity",
] ]
@ -58,7 +58,7 @@ dependencies = [
[[package]] [[package]]
name = "cranelift-codegen" name = "cranelift-codegen"
version = "0.68.0" version = "0.68.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#bfd10512c10ef08d1969ab961e88dbbb41a3b201" source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#8f7f8ee0b4c5007ace6de29b45505c360450b1bb"
dependencies = [ dependencies = [
"byteorder", "byteorder",
"cranelift-bforest", "cranelift-bforest",
@ -76,7 +76,7 @@ dependencies = [
[[package]] [[package]]
name = "cranelift-codegen-meta" name = "cranelift-codegen-meta"
version = "0.68.0" version = "0.68.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#bfd10512c10ef08d1969ab961e88dbbb41a3b201" source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#8f7f8ee0b4c5007ace6de29b45505c360450b1bb"
dependencies = [ dependencies = [
"cranelift-codegen-shared", "cranelift-codegen-shared",
"cranelift-entity", "cranelift-entity",
@ -85,17 +85,17 @@ dependencies = [
[[package]] [[package]]
name = "cranelift-codegen-shared" name = "cranelift-codegen-shared"
version = "0.68.0" version = "0.68.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#bfd10512c10ef08d1969ab961e88dbbb41a3b201" source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#8f7f8ee0b4c5007ace6de29b45505c360450b1bb"
[[package]] [[package]]
name = "cranelift-entity" name = "cranelift-entity"
version = "0.68.0" version = "0.68.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#bfd10512c10ef08d1969ab961e88dbbb41a3b201" source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#8f7f8ee0b4c5007ace6de29b45505c360450b1bb"
[[package]] [[package]]
name = "cranelift-frontend" name = "cranelift-frontend"
version = "0.68.0" version = "0.68.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#bfd10512c10ef08d1969ab961e88dbbb41a3b201" source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#8f7f8ee0b4c5007ace6de29b45505c360450b1bb"
dependencies = [ dependencies = [
"cranelift-codegen", "cranelift-codegen",
"log", "log",
@ -104,44 +104,9 @@ dependencies = [
] ]
[[package]] [[package]]
name = "cranelift-module" name = "cranelift-jit"
version = "0.68.0" version = "0.68.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#bfd10512c10ef08d1969ab961e88dbbb41a3b201" source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#8f7f8ee0b4c5007ace6de29b45505c360450b1bb"
dependencies = [
"anyhow",
"cranelift-codegen",
"cranelift-entity",
"log",
"thiserror",
]
[[package]]
name = "cranelift-native"
version = "0.68.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#bfd10512c10ef08d1969ab961e88dbbb41a3b201"
dependencies = [
"cranelift-codegen",
"raw-cpuid",
"target-lexicon",
]
[[package]]
name = "cranelift-object"
version = "0.68.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#bfd10512c10ef08d1969ab961e88dbbb41a3b201"
dependencies = [
"anyhow",
"cranelift-codegen",
"cranelift-module",
"log",
"object",
"target-lexicon",
]
[[package]]
name = "cranelift-simplejit"
version = "0.68.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#bfd10512c10ef08d1969ab961e88dbbb41a3b201"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"cranelift-codegen", "cranelift-codegen",
@ -156,6 +121,41 @@ dependencies = [
"winapi", "winapi",
] ]
[[package]]
name = "cranelift-module"
version = "0.68.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#8f7f8ee0b4c5007ace6de29b45505c360450b1bb"
dependencies = [
"anyhow",
"cranelift-codegen",
"cranelift-entity",
"log",
"thiserror",
]
[[package]]
name = "cranelift-native"
version = "0.68.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#8f7f8ee0b4c5007ace6de29b45505c360450b1bb"
dependencies = [
"cranelift-codegen",
"raw-cpuid",
"target-lexicon",
]
[[package]]
name = "cranelift-object"
version = "0.68.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#8f7f8ee0b4c5007ace6de29b45505c360450b1bb"
dependencies = [
"anyhow",
"cranelift-codegen",
"cranelift-module",
"log",
"object",
"target-lexicon",
]
[[package]] [[package]]
name = "crc32fast" name = "crc32fast"
version = "1.2.1" version = "1.2.1"
@ -326,9 +326,9 @@ dependencies = [
"ar", "ar",
"cranelift-codegen", "cranelift-codegen",
"cranelift-frontend", "cranelift-frontend",
"cranelift-jit",
"cranelift-module", "cranelift-module",
"cranelift-object", "cranelift-object",
"cranelift-simplejit",
"gimli", "gimli",
"indexmap", "indexmap",
"libloading", "libloading",

View File

@ -12,7 +12,7 @@ crate-type = ["dylib"]
cranelift-codegen = { git = "https://github.com/bytecodealliance/wasmtime/", branch = "main", features = ["unwind"] } cranelift-codegen = { git = "https://github.com/bytecodealliance/wasmtime/", branch = "main", features = ["unwind"] }
cranelift-frontend = { git = "https://github.com/bytecodealliance/wasmtime/", branch = "main" } cranelift-frontend = { git = "https://github.com/bytecodealliance/wasmtime/", branch = "main" }
cranelift-module = { git = "https://github.com/bytecodealliance/wasmtime/", branch = "main" } cranelift-module = { git = "https://github.com/bytecodealliance/wasmtime/", branch = "main" }
cranelift-simplejit = { git = "https://github.com/bytecodealliance/wasmtime/", branch = "main", optional = true } cranelift-jit = { git = "https://github.com/bytecodealliance/wasmtime/", branch = "main", optional = true }
cranelift-object = { git = "https://github.com/bytecodealliance/wasmtime/", branch = "main" } cranelift-object = { git = "https://github.com/bytecodealliance/wasmtime/", branch = "main" }
target-lexicon = "0.11.0" target-lexicon = "0.11.0"
gimli = { version = "0.23.0", default-features = false, features = ["write"]} gimli = { version = "0.23.0", default-features = false, features = ["write"]}
@ -27,7 +27,7 @@ libloading = { version = "0.6.0", optional = true }
#cranelift-codegen = { path = "../wasmtime/cranelift/codegen" } #cranelift-codegen = { path = "../wasmtime/cranelift/codegen" }
#cranelift-frontend = { path = "../wasmtime/cranelift/frontend" } #cranelift-frontend = { path = "../wasmtime/cranelift/frontend" }
#cranelift-module = { path = "../wasmtime/cranelift/module" } #cranelift-module = { path = "../wasmtime/cranelift/module" }
#cranelift-simplejit = { path = "../wasmtime/cranelift/simplejit" } #cranelift-jit = { path = "../wasmtime/cranelift/jit" }
#cranelift-object = { path = "../wasmtime/cranelift/object" } #cranelift-object = { path = "../wasmtime/cranelift/object" }
#[patch.crates-io] #[patch.crates-io]
@ -35,7 +35,7 @@ libloading = { version = "0.6.0", optional = true }
[features] [features]
default = ["jit", "inline_asm"] default = ["jit", "inline_asm"]
jit = ["cranelift-simplejit", "libloading"] jit = ["cranelift-jit", "libloading"]
inline_asm = [] inline_asm = []
[profile.dev] [profile.dev]

View File

@ -76,7 +76,7 @@ impl WriterRelocate {
#[cfg(feature = "jit")] #[cfg(feature = "jit")]
pub(super) fn relocate_for_jit( pub(super) fn relocate_for_jit(
mut self, mut self,
jit_module: &cranelift_simplejit::SimpleJITModule, jit_module: &cranelift_jit::JITModule,
) -> Vec<u8> { ) -> Vec<u8> {
use std::convert::TryInto; use std::convert::TryInto;

View File

@ -80,7 +80,7 @@ impl<'tcx> UnwindContext<'tcx> {
#[cfg(feature = "jit")] #[cfg(feature = "jit")]
pub(crate) unsafe fn register_jit( pub(crate) unsafe fn register_jit(
self, self,
jit_module: &cranelift_simplejit::SimpleJITModule, jit_module: &cranelift_jit::JITModule,
) -> Option<UnwindRegistry> { ) -> Option<UnwindRegistry> {
let mut eh_frame = EhFrame::from(super::emit::WriterRelocate::new(super::target_endian( let mut eh_frame = EhFrame::from(super::emit::WriterRelocate::new(super::target_endian(
self.tcx, self.tcx,

View File

@ -7,7 +7,7 @@ use std::os::raw::{c_char, c_int};
use rustc_codegen_ssa::CrateInfo; use rustc_codegen_ssa::CrateInfo;
use rustc_middle::mir::mono::MonoItem; use rustc_middle::mir::mono::MonoItem;
use cranelift_simplejit::{SimpleJITBuilder, SimpleJITModule}; use cranelift_jit::{JITBuilder, JITModule};
use crate::prelude::*; use crate::prelude::*;
@ -36,12 +36,12 @@ pub(super) fn run_jit(tcx: TyCtxt<'_>) -> ! {
let imported_symbols = load_imported_symbols_for_jit(tcx); let imported_symbols = load_imported_symbols_for_jit(tcx);
let mut jit_builder = SimpleJITBuilder::with_isa( let mut jit_builder = JITBuilder::with_isa(
crate::build_isa(tcx.sess, false), crate::build_isa(tcx.sess, false),
cranelift_module::default_libcall_names(), cranelift_module::default_libcall_names(),
); );
jit_builder.symbols(imported_symbols); jit_builder.symbols(imported_symbols);
let mut jit_module = SimpleJITModule::new(jit_builder); let mut jit_module = JITModule::new(jit_builder);
assert_eq!(pointer_ty(tcx), jit_module.target_config().pointer_type()); assert_eq!(pointer_ty(tcx), jit_module.target_config().pointer_type());
let sig = Signature { let sig = Signature {