Skip to content

Commit 9a60ffd

Browse files
committed
[WIP] Update to Cranelift 0.109
1 parent 632e5df commit 9a60ffd

File tree

4 files changed

+38
-49
lines changed

4 files changed

+38
-49
lines changed

Cargo.lock

Lines changed: 28 additions & 41 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ crate-type = ["dylib"]
88

99
[dependencies]
1010
# These have to be in sync with each other
11-
cranelift-codegen = { version = "0.108.0", default-features = false, features = ["std", "unwind", "all-arch"] }
12-
cranelift-frontend = { version = "0.108.0" }
13-
cranelift-module = { version = "0.108.0" }
14-
cranelift-native = { version = "0.108.0" }
15-
cranelift-jit = { version = "0.108.0", optional = true }
16-
cranelift-object = { version = "0.108.0" }
11+
cranelift-codegen = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-22.0.0", version = "0.109.0", default-features = false, features = ["std", "unwind", "all-arch"] }
12+
cranelift-frontend = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-22.0.0", version = "0.109.0" }
13+
cranelift-module = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-22.0.0", version = "0.109.0" }
14+
cranelift-native = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-22.0.0", version = "0.109.0" }
15+
cranelift-jit = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-22.0.0", version = "0.109.0", optional = true }
16+
cranelift-object = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-22.0.0", version = "0.109.0" }
1717
target-lexicon = "0.12.0"
1818
gimli = { version = "0.28", default-features = false, features = ["write"]}
19-
object = { version = "0.33", default-features = false, features = ["std", "read_core", "write", "archive", "coff", "elf", "macho", "pe"] }
19+
object = { version = "0.36", default-features = false, features = ["std", "read_core", "write", "archive", "coff", "elf", "macho", "pe"] }
2020

2121
indexmap = "2.0.0"
2222
libloading = { version = "0.8.0", optional = true }

src/common.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,7 @@ impl<'tcx> FunctionCx<'_, '_, 'tcx> {
395395
// FIXME Don't force the size to a multiple of <abi_align> bytes once Cranelift gets
396396
// a way to specify stack slot alignment.
397397
size: (size + abi_align - 1) / abi_align * abi_align,
398+
align_shift: 4,
398399
});
399400
Pointer::stack_slot(stack_slot)
400401
} else {
@@ -405,6 +406,7 @@ impl<'tcx> FunctionCx<'_, '_, 'tcx> {
405406
// FIXME Don't force the size to a multiple of <abi_align> bytes once Cranelift gets
406407
// a way to specify stack slot alignment.
407408
size: (size + align) / abi_align * abi_align,
409+
align_shift: 4,
408410
});
409411
let base_ptr = self.bcx.ins().stack_addr(self.pointer_type, stack_slot, 0);
410412
let misalign_offset = self.bcx.ins().urem_imm(base_ptr, i64::from(align));

src/driver/jit.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ fn jit_fn(instance_ptr: *const Instance<'static>, trampoline_ptr: *const u8) ->
310310
fn dep_symbol_lookup_fn(
311311
sess: &Session,
312312
crate_info: CrateInfo,
313-
) -> Box<dyn Fn(&str) -> Option<*const u8>> {
313+
) -> Box<dyn Fn(&str) -> Option<*const u8> + Send> {
314314
use rustc_middle::middle::dependency_format::Linkage;
315315

316316
let mut dylib_paths = Vec::new();

0 commit comments

Comments
 (0)