Auto merge of #128313 - GuillaumeGomez:rollup-kacb489, r=GuillaumeGomez
Rollup of 6 pull requests Successful merges: - #125779 ([rustdoc] Add copy code feature) - #127765 (Fix doc nits) - #127860 (deps: dedup object, wasmparser, wasm-encoder) - #128103 (add `is_multiple_of` for unsigned integer types) - #128228 (Stabilize `const_waker`) - #128240 (Add links from `assert_eq!` docs to `debug_assert_eq!`, etc.) r? `@ghost` `@rustbot` modify labels: rollup
This commit is contained in:
commit
2cbbe8b8bb
167 changed files with 1158 additions and 877 deletions
|
@ -12,7 +12,7 @@ bitflags = "2.4.1"
|
|||
itertools = "0.12"
|
||||
libc = "0.2"
|
||||
measureme = "11"
|
||||
object = { version = "0.32.0", default-features = false, features = ["std", "read"] }
|
||||
object = { version = "0.36.2", default-features = false, features = ["std", "read"] }
|
||||
rustc-demangle = "0.1.21"
|
||||
rustc_ast = { path = "../rustc_ast" }
|
||||
rustc_attr = { path = "../rustc_attr" }
|
||||
|
|
|
@ -41,7 +41,7 @@ tempfile = "3.2"
|
|||
thin-vec = "0.2.12"
|
||||
thorin-dwp = "0.7"
|
||||
tracing = "0.1"
|
||||
wasm-encoder = "0.200.0"
|
||||
wasm-encoder = "0.210.0"
|
||||
# tidy-alphabetical-end
|
||||
|
||||
[target.'cfg(unix)'.dependencies]
|
||||
|
@ -50,7 +50,7 @@ libc = "0.2.50"
|
|||
# tidy-alphabetical-end
|
||||
|
||||
[dependencies.object]
|
||||
version = "0.32.1"
|
||||
version = "0.36.2"
|
||||
default-features = false
|
||||
features = ["read_core", "elf", "macho", "pe", "xcoff", "unaligned", "archive", "write", "wasm"]
|
||||
|
||||
|
|
|
@ -110,13 +110,11 @@ impl<'a> ArArchiveBuilder<'a> {
|
|||
}
|
||||
|
||||
fn try_filter_fat_archs(
|
||||
archs: object::read::Result<&[impl FatArch]>,
|
||||
archs: &[impl FatArch],
|
||||
target_arch: object::Architecture,
|
||||
archive_path: &Path,
|
||||
archive_map_data: &[u8],
|
||||
) -> io::Result<Option<PathBuf>> {
|
||||
let archs = archs.map_err(|e| io::Error::new(io::ErrorKind::Other, e))?;
|
||||
|
||||
let desired = match archs.iter().find(|a| a.architecture() == target_arch) {
|
||||
Some(a) => a,
|
||||
None => return Ok(None),
|
||||
|
@ -146,17 +144,15 @@ pub fn try_extract_macho_fat_archive(
|
|||
_ => return Ok(None),
|
||||
};
|
||||
|
||||
match object::macho::FatHeader::parse(&*archive_map) {
|
||||
Ok(h) if h.magic.get(object::endian::BigEndian) == object::macho::FAT_MAGIC => {
|
||||
let archs = object::macho::FatHeader::parse_arch32(&*archive_map);
|
||||
try_filter_fat_archs(archs, target_arch, archive_path, &*archive_map)
|
||||
}
|
||||
Ok(h) if h.magic.get(object::endian::BigEndian) == object::macho::FAT_MAGIC_64 => {
|
||||
let archs = object::macho::FatHeader::parse_arch64(&*archive_map);
|
||||
try_filter_fat_archs(archs, target_arch, archive_path, &*archive_map)
|
||||
}
|
||||
if let Ok(h) = object::read::macho::MachOFatFile32::parse(&*archive_map) {
|
||||
let archs = h.arches();
|
||||
try_filter_fat_archs(archs, target_arch, archive_path, &*archive_map)
|
||||
} else if let Ok(h) = object::read::macho::MachOFatFile64::parse(&*archive_map) {
|
||||
let archs = h.arches();
|
||||
try_filter_fat_archs(archs, target_arch, archive_path, &*archive_map)
|
||||
} else {
|
||||
// Not a FatHeader at all, just return None.
|
||||
_ => Ok(None),
|
||||
Ok(None)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -700,7 +700,7 @@ fn link_dwarf_object(sess: &Session, cg_results: &CodegenResults, executable_out
|
|||
.truncate(true)
|
||||
.open(dwp_out_filename)?,
|
||||
);
|
||||
let mut output_stream = object::write::StreamingBuffer::new(output_stream);
|
||||
let mut output_stream = thorin::object::write::StreamingBuffer::new(output_stream);
|
||||
package.finish()?.emit(&mut output_stream)?;
|
||||
output_stream.result()?;
|
||||
output_stream.into_inner().flush()?;
|
||||
|
|
|
@ -656,7 +656,13 @@ pub fn create_metadata_file_for_wasm(sess: &Session, data: &[u8], section_name:
|
|||
imports.import(
|
||||
"env",
|
||||
"__linear_memory",
|
||||
wasm_encoder::MemoryType { minimum: 0, maximum: None, memory64: true, shared: false },
|
||||
wasm_encoder::MemoryType {
|
||||
minimum: 0,
|
||||
maximum: None,
|
||||
memory64: true,
|
||||
shared: false,
|
||||
page_size_log2: None,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -22,5 +22,5 @@ tracing = "0.1"
|
|||
# tidy-alphabetical-start
|
||||
default-features = false
|
||||
features = ["elf", "macho"]
|
||||
version = "0.32.0"
|
||||
version = "0.36.2"
|
||||
# tidy-alphabetical-end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue