Skip to content

Commit

Permalink
Merge branch 'rust-lang:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
BrandonMFong authored Sep 27, 2023
2 parents 87c577e + 9593176 commit 8bf0a5c
Show file tree
Hide file tree
Showing 53 changed files with 1,992 additions and 1,287 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/bors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@ jobs:
sparc64-unknown-linux-gnu,
wasm32-unknown-emscripten,
x86_64-linux-android,
x86_64-unknown-linux-gnux32,
# FIXME: Exec format error (os error 8)
#x86_64-unknown-linux-gnux32,
x86_64-unknown-linux-musl,
# FIXME: It seems some items in `src/unix/mod.rs`
# aren't defined on redox actually.
Expand Down Expand Up @@ -237,7 +238,9 @@ jobs:
stable,
beta,
nightly,
1.13.0,
# FIXME: Disabled due to:
# error: failed to parse registry's information for: serde
#1.13.0,
1.19.0,
1.24.0,
1.25.0,
Expand Down Expand Up @@ -270,7 +273,9 @@ jobs:
- { toolchain: beta, os: macos-12 }
- { toolchain: nightly, os: macos-12 }
# Use macOS 11 for older toolchains as newer Xcode donesn't work well.
- { toolchain: 1.13.0, os: macos-11 }
# FIXME: Disabled due to:
# error: failed to parse registry's information for: serde
#- { toolchain: 1.13.0, os: macos-11 }
- { toolchain: 1.19.0, os: macos-11 }
- { toolchain: 1.24.0, os: macos-11 }
- { toolchain: 1.25.0, os: macos-11 }
Expand Down
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "libc"
version = "0.2.147"
version = "0.2.148"
authors = ["The Rust Project Developers"]
license = "MIT OR Apache-2.0"
readme = "README.md"
Expand Down Expand Up @@ -84,6 +84,7 @@ targets = [
"riscv32imac-unknown-none-elf",
"riscv32imc-unknown-none-elf",
"riscv64gc-unknown-freebsd",
"riscv64gc-unknown-hermit",
"riscv64gc-unknown-linux-gnu",
"riscv64gc-unknown-linux-musl",
"riscv64gc-unknown-none-elf",
Expand Down
2 changes: 1 addition & 1 deletion ci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ riscv32imac-unknown-none-elf \
riscv32imc-unknown-none-elf \
riscv32gc-unknown-linux-gnu \
riscv64gc-unknown-freebsd \
riscv64gc-unknown-hermit \
riscv64gc-unknown-linux-musl \
riscv64gc-unknown-none-elf \
riscv64imac-unknown-none-elf \
Expand Down Expand Up @@ -285,7 +286,6 @@ if [ "${RUST}" = "nightly" ] && [ "${OS}" = "linux" ]; then
fi

RUST_APPLE_NO_CORE_TARGETS="\
armv7-apple-ios \
armv7s-apple-ios \
i686-apple-darwin \
i386-apple-ios \
Expand Down
4 changes: 0 additions & 4 deletions ci/emscripten-entry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,4 @@ set -ex
# shellcheck disable=SC1091
source /emsdk-portable/emsdk_env.sh &> /dev/null

# emsdk-portable provides a node binary, but we need version 8 to run wasm
# NOTE: Do not forget to sync Node.js version with `emscripten.sh`!
export PATH="/node-v14.17.0-linux-x64/bin:$PATH"

exec "$@"
6 changes: 0 additions & 6 deletions ci/emscripten.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,3 @@ rm -f a.*

# Make emsdk usable by any user
chmod a+rxw -R /emsdk-portable

# node 8 is required to run wasm
# NOTE: Do not forget to sync Node.js version with `emscripten-entry.sh`!
cd /
curl --retry 5 -L https://nodejs.org/dist/v14.17.0/node-v14.17.0-linux-x64.tar.xz | \
tar -xJ
4 changes: 2 additions & 2 deletions libc-test/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "libc-test"
version = "0.2.147"
version = "0.2.148"
authors = ["The Rust Project Developers"]
license = "MIT OR Apache-2.0"
build = "build.rs"
Expand All @@ -12,7 +12,7 @@ A test crate for the libc crate.

[dependencies.libc]
path = ".."
version = "0.2.147"
version = "0.2.148"
default-features = false

[build-dependencies]
Expand Down
26 changes: 23 additions & 3 deletions libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1881,6 +1881,9 @@ fn test_android(target: &str) {
// Added in API level 28, but some tests use level 24.
"syncfs" => true,

// Added in API level 28, but some tests use level 24.
"pthread_attr_getinheritsched" | "pthread_attr_setinheritsched" => true,

_ => false,
}
});
Expand Down Expand Up @@ -2625,13 +2628,19 @@ fn test_emscripten(target: &str) {

"os_unfair_lock" => "struct os_unfair_lock_s".to_string(),

t if is_union => format!("union {}", t),
// LFS64 types have been removed in Emscripten 3.1.44+
// https://github.com/emscripten-core/emscripten/pull/19812
"off64_t" => "off_t".to_string(),

// typedefs don't need any keywords
t if t.ends_with("_t") => t.to_string(),

// put `struct` in front of all structs:.
t if is_struct => format!("struct {}", t),

// put `union` in front of all unions:
t if is_union => format!("union {}", t),

t => t.to_string(),
}
});
Expand All @@ -2658,7 +2667,9 @@ fn test_emscripten(target: &str) {
// FIXME: The size has been changed due to musl's time64
"time_t" => true,

_ => false,
// LFS64 types have been removed in Emscripten 3.1.44+
// https://github.com/emscripten-core/emscripten/pull/19812
t => t.ends_with("64") || t.ends_with("64_t"),
}
});

Expand Down Expand Up @@ -2687,7 +2698,9 @@ fn test_emscripten(target: &str) {
"utimbuf" | "timeval" | "timespec" | "rusage" | "itimerval" | "sched_param"
| "stat" | "stat64" | "shmid_ds" | "msqid_ds" => true,

_ => false,
// LFS64 types have been removed in Emscripten 3.1.44+
// https://github.com/emscripten-core/emscripten/pull/19812
ty => ty.ends_with("64") || ty.ends_with("64_t"),
}
});

Expand Down Expand Up @@ -2729,6 +2742,10 @@ fn test_emscripten(target: &str) {
| "SIG_IGN" // -1
=> true,

// LFS64 types have been removed in Emscripten 3.1.44+
// https://github.com/emscripten-core/emscripten/pull/19812
n if n.starts_with("RLIM64") => true,

_ => false,
}
});
Expand Down Expand Up @@ -3791,6 +3808,9 @@ fn test_linux(target: &str) {
| "MADV_POPULATE_WRITE"
if musl => true,

// kernel 6.1 minimum
"MADV_COLLAPSE" => true,

// FIXME: Requires more recent kernel headers
| "IFLA_PARENT_DEV_NAME" // linux v5.13+
| "IFLA_PARENT_DEV_BUS_NAME" // linux v5.13+
Expand Down
2 changes: 2 additions & 0 deletions libc-test/semver/android-aarch64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ HWCAP2_SVEBITPERM
HWCAP2_SVEPMULL
HWCAP2_SVESHA3
HWCAP2_SVESM4
PROT_BTI
PROT_MTE
SYS_arch_specific_syscall
SYS_syscalls
SYS_fcntl
Expand Down
2 changes: 2 additions & 0 deletions libc-test/semver/android.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3375,8 +3375,10 @@ pthread_atfork
pthread_attr_destroy
pthread_attr_getguardsize
pthread_attr_getstack
pthread_attr_getstacksize
pthread_attr_init
pthread_attr_setdetachstate
pthread_attr_setguardsize
pthread_attr_setstacksize
pthread_attr_t
pthread_barrierattr_destroy
Expand Down
Loading

0 comments on commit 8bf0a5c

Please sign in to comment.