Skip to content

Commit 6ec27fe

Browse files
committed
Update to Cranelift 0.107
1 parent 2c6ef5a commit 6ec27fe

File tree

3 files changed

+41
-39
lines changed

3 files changed

+41
-39
lines changed

Cargo.lock

+28-28
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+7-7
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.106.0", default-features = false, features = ["std", "unwind", "all-arch"] }
12-
cranelift-frontend = { version = "0.106.0" }
13-
cranelift-module = { version = "0.106.0" }
14-
cranelift-native = { version = "0.106.0" }
15-
cranelift-jit = { version = "0.106.0", optional = true }
16-
cranelift-object = { version = "0.106.0" }
11+
cranelift-codegen = { version = "0.107.0", default-features = false, features = ["std", "unwind", "all-arch"] }
12+
cranelift-frontend = { version = "0.107.0" }
13+
cranelift-module = { version = "0.107.0" }
14+
cranelift-native = { version = "0.107.0" }
15+
cranelift-jit = { version = "0.107.0", optional = true }
16+
cranelift-object = { version = "0.107.0" }
1717
target-lexicon = "0.12.0"
1818
gimli = { version = "0.28", default-features = false, features = ["write"]}
19-
object = { version = "0.32", default-features = false, features = ["std", "read_core", "write", "archive", "coff", "elf", "macho", "pe"] }
19+
object = { version = "0.33", 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/debuginfo/object.rs

+6-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use cranelift_module::{DataId, FuncId};
22
use cranelift_object::ObjectProduct;
33
use gimli::SectionId;
44
use object::write::{Relocation, StandardSegment};
5-
use object::{RelocationEncoding, SectionKind};
5+
use object::{RelocationEncoding, RelocationFlags, SectionKind};
66
use rustc_data_structures::fx::FxHashMap;
77

88
use crate::debuginfo::{DebugReloc, DebugRelocName};
@@ -72,9 +72,11 @@ impl WriteDebugInfo for ObjectProduct {
7272
Relocation {
7373
offset: u64::from(reloc.offset),
7474
symbol,
75-
kind: reloc.kind,
76-
encoding: RelocationEncoding::Generic,
77-
size: reloc.size * 8,
75+
flags: RelocationFlags::Generic {
76+
kind: reloc.kind,
77+
encoding: RelocationEncoding::Generic,
78+
size: reloc.size * 8,
79+
},
7880
addend: i64::try_from(symbol_offset).unwrap() + reloc.addend,
7981
},
8082
)

0 commit comments

Comments
 (0)