Update WASI to cap-std 0.25 and windows-sys. (#4302)

This updates to rustix 0.35.6, and updates wasi-common to use cap-std 0.25 and
windows-sys (instead of winapi).

Changes include:

 - Better error code mappings on Windows.
 - Fixes undefined references to `utimensat` on Darwin.
 - Fixes undefined references to `preadv64` and `pwritev64` on Android.
 - Updates to io-lifetimes 0.7, which matches the io_safety API in Rust.
 - y2038 bug fixes for 32-bit platforms
This commit is contained in:
Dan Gohman
2022-06-23 10:47:15 -07:00
committed by GitHub
parent 445cc87a06
commit fa36e86f2c
27 changed files with 317 additions and 186 deletions

View File

@@ -15,7 +15,7 @@ lazy_static = {version = "1.3.0", optional = true }
object = { version = "0.28.0", default-features = false, features = ["std", "read_core"], optional = true }
[target.'cfg(target_os = "linux")'.dependencies]
rustix = { version = "0.33.7", optional = true }
rustix = { version = "0.35.6", features = ["mm", "param", "time"], optional = true }
[badges]
maintenance = { status = "actively-developed" }

View File

@@ -158,11 +158,11 @@ impl JitDumpFile {
// To match what some perf examples are doing we keep this `mmap` alive
// until this agent goes away.
let map_addr = unsafe {
let ptr = rustix::io::mmap(
let ptr = rustix::mm::mmap(
ptr::null_mut(),
rustix::process::page_size(),
rustix::io::ProtFlags::EXEC | rustix::io::ProtFlags::READ,
rustix::io::MapFlags::PRIVATE,
rustix::param::page_size(),
rustix::mm::ProtFlags::EXEC | rustix::mm::ProtFlags::READ,
rustix::mm::MapFlags::PRIVATE,
&jitdump_file,
0,
)?;
@@ -287,7 +287,7 @@ impl JitDumpFile {
impl Drop for JitDumpFile {
fn drop(&mut self) {
unsafe {
rustix::io::munmap(self.map_addr as *mut _, rustix::process::page_size()).unwrap();
rustix::mm::munmap(self.map_addr as *mut _, rustix::param::page_size()).unwrap();
}
}
}