Skip to content

Commit 5fb5813

Browse files
committed
[WIP] Use correct segment for metadata section
1 parent acb3381 commit 5fb5813

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

Cargo.lock

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

Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,8 @@ object = "0.11.0"
4040
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
4141
cranelift-simplejit = { git = "https://github.com/CraneStation/cranelift.git" }
4242

43+
[patch.crates-io]
44+
faerie = { git = "https://github.com/m4b/faerie.git", rev = "dcb671a99faa32b72fac88d2406e952a41844636" }
45+
4346
[profile.dev.overrides."*"]
4447
opt-level = 3

src/debuginfo.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ impl<'a, 'tcx: 'a> DebugContext<'tcx> {
191191
let _: Result<()> = sections.for_each_mut(|id, section| {
192192
if !section.writer.slice().is_empty() {
193193
artifact
194-
.declare_with(id.name(), Decl::debug_section(), section.writer.take())
194+
.declare_with(id.name(), Decl::section(SectionKind::Debug), section.writer.take())
195195
.unwrap();
196196
}
197197
Ok(())

src/metadata.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ pub fn write_metadata<'a, 'gcx>(
9090
DeflateEncoder::new(&mut compressed, Compression::fast())
9191
.write_all(&metadata.raw_data).unwrap();
9292

93-
artifact.declare_with(".rustc", faerie::Decl::debug_section(), compressed).unwrap();
93+
artifact.declare_with(".rustc", faerie::Decl::section(faerie::SectionKind::Data), compressed).unwrap();
9494

9595
metadata
9696
}

0 commit comments

Comments
 (0)