Skip to content

Commit

Permalink
Update to Cranelift 0.109
Browse files Browse the repository at this point in the history
  • Loading branch information
bjorn3 committed Jun 20, 2024
1 parent cdad523 commit 2a37825
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 36 deletions.
56 changes: 28 additions & 28 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ crate-type = ["dylib"]

[dependencies]
# These have to be in sync with each other
cranelift-codegen = { version = "0.108.0", default-features = false, features = ["std", "unwind", "all-arch"] }
cranelift-frontend = { version = "0.108.0" }
cranelift-module = { version = "0.108.0" }
cranelift-native = { version = "0.108.0" }
cranelift-jit = { version = "0.108.0", optional = true }
cranelift-object = { version = "0.108.0" }
cranelift-codegen = { version = "0.109.0", default-features = false, features = ["std", "unwind", "all-arch"] }
cranelift-frontend = { version = "0.109.0" }
cranelift-module = { version = "0.109.0" }
cranelift-native = { version = "0.109.0" }
cranelift-jit = { version = "0.109.0", optional = true }
cranelift-object = { version = "0.109.0" }
target-lexicon = "0.12.0"
gimli = { version = "0.28", default-features = false, features = ["write"]}
object = { version = "0.33", default-features = false, features = ["std", "read_core", "write", "archive", "coff", "elf", "macho", "pe"] }
object = { version = "0.36", default-features = false, features = ["std", "read_core", "write", "archive", "coff", "elf", "macho", "pe"] }

indexmap = "2.0.0"
libloading = { version = "0.8.0", optional = true }
Expand Down
2 changes: 2 additions & 0 deletions src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,7 @@ impl<'tcx> FunctionCx<'_, '_, 'tcx> {
// FIXME Don't force the size to a multiple of <abi_align> bytes once Cranelift gets
// a way to specify stack slot alignment.
size: (size + abi_align - 1) / abi_align * abi_align,
align_shift: 4,
});
Pointer::stack_slot(stack_slot)
} else {
Expand All @@ -405,6 +406,7 @@ impl<'tcx> FunctionCx<'_, '_, 'tcx> {
// FIXME Don't force the size to a multiple of <abi_align> bytes once Cranelift gets
// a way to specify stack slot alignment.
size: (size + align) / abi_align * abi_align,
align_shift: 4,
});
let base_ptr = self.bcx.ins().stack_addr(self.pointer_type, stack_slot, 0);
let misalign_offset = self.bcx.ins().urem_imm(base_ptr, i64::from(align));
Expand Down
2 changes: 1 addition & 1 deletion src/driver/jit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ fn jit_fn(instance_ptr: *const Instance<'static>, trampoline_ptr: *const u8) ->
fn dep_symbol_lookup_fn(
sess: &Session,
crate_info: CrateInfo,
) -> Box<dyn Fn(&str) -> Option<*const u8>> {
) -> Box<dyn Fn(&str) -> Option<*const u8> + Send> {
use rustc_middle::middle::dependency_format::Linkage;

let mut dylib_paths = Vec::new();
Expand Down

0 comments on commit 2a37825

Please sign in to comment.