Skip to content

Commit

Permalink
Merge branch 'rust-lang:main' into quinn
Browse files Browse the repository at this point in the history
  • Loading branch information
psumbera authored Jul 11, 2024
2 parents 8281157 + ce2ccd5 commit a3805ca
Show file tree
Hide file tree
Showing 26 changed files with 781 additions and 86 deletions.
2 changes: 1 addition & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ task:
task:
name: nightly x86_64-unknown-freebsd-14
freebsd_instance:
image: freebsd-14-0-release-amd64-ufs
image: freebsd-14-1-release-amd64-ufs
setup_script:
- pkg install -y libnghttp2 curl
- curl https://sh.rustup.rs -sSf --output rustup.sh
Expand Down
23 changes: 15 additions & 8 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,21 @@ fn main() {
//
// On CI, we detect the actual FreeBSD version and match its ABI exactly,
// running tests to ensure that the ABI is correct.
match which_freebsd() {
Some(10) if libc_ci => set_cfg("freebsd10"),
Some(11) if libc_ci => set_cfg("freebsd11"),
Some(12) if libc_ci || rustc_dep_of_std => set_cfg("freebsd12"),
Some(13) if libc_ci => set_cfg("freebsd13"),
Some(14) if libc_ci => set_cfg("freebsd14"),
Some(15) if libc_ci => set_cfg("freebsd15"),
Some(_) | None => set_cfg("freebsd11"),
let which_freebsd = if libc_ci {
which_freebsd().unwrap_or(11)
} else if rustc_dep_of_std {
12
} else {
11
};
match which_freebsd {
x if x < 10 => panic!("FreeBSD older than 10 is not supported"),
10 => set_cfg("freebsd10"),
11 => set_cfg("freebsd11"),
12 => set_cfg("freebsd12"),
13 => set_cfg("freebsd13"),
14 => set_cfg("freebsd14"),
_ => set_cfg("freebsd15"),
}

match emcc_version_code() {
Expand Down
8 changes: 4 additions & 4 deletions ci/install-rust.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ fi
if [ "$OS" = "windows" ]; then
: "${TARGET?The TARGET environment variable must be set.}"
rustup set profile minimal
rustup update --force $toolchain-"$TARGET"
rustup default $toolchain-"$TARGET"
rustup update --force "$toolchain-$TARGET"
rustup default "$toolchain-$TARGET"
else
rustup set profile minimal
rustup update --force $toolchain
rustup default $toolchain
rustup update --force "$toolchain"
rustup default "$toolchain"
fi

if [ -n "$TARGET" ]; then
Expand Down
5 changes: 5 additions & 0 deletions libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ fn test_apple(target: &str) {
"netinet/ip.h",
"netinet/tcp.h",
"netinet/udp.h",
"netinet6/in6_var.h",
"os/lock.h",
"os/signpost.h",
"poll.h",
Expand Down Expand Up @@ -351,6 +352,7 @@ fn test_apple(target: &str) {
// MAXPATHLEN is too big for auto-derive traits on arrays.
("vnode_info_path", "vip_path") => true,
("ifreq", "ifr_ifru") => true,
("in6_ifreq", "ifr_ifru") => true,
("ifkpi", "ifk_data") => true,
("ifconf", "ifc_ifcu") => true,
_ => false,
Expand Down Expand Up @@ -2409,6 +2411,9 @@ fn test_freebsd(target: &str) {
// FIXME: Removed in FreeBSD 15:
"LOCAL_CONNWAIT" => true,

// FIXME: The values has been changed in FreeBSD 15:
"CLOCK_BOOTTIME" if Some(15) <= freebsd_ver => true,

_ => false,
}
});
Expand Down
1 change: 1 addition & 0 deletions libc-test/semver/android.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2029,6 +2029,7 @@ RTLD_LAZY
RTLD_LOCAL
RTLD_NOLOAD
RTLD_NOW
RTLD_NODELETE
TCA_UNSPEC
TCA_KIND
TCA_OPTIONS
Expand Down
6 changes: 6 additions & 0 deletions libc-test/semver/apple.txt
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,7 @@ FSOPT_REPORT_FULLSIZE
FSOPT_RETURN_REALDEV
F_ALLOCATEALL
F_ALLOCATECONTIG
F_ALLOCATEPERSIST
F_BARRIERFSYNC
F_FREEZE_FS
F_FULLFSYNC
Expand Down Expand Up @@ -1860,6 +1861,7 @@ getxattr
glob
glob_t
globfree
icmp6_ifstat
iconv_t
id_t
idtype_t
Expand All @@ -1873,6 +1875,9 @@ ifkpi
ifreq
image_offset
in6_pktinfo
in6_addrlifetime
in6_ifreq
in6_ifstat
in_pktinfo
initgroups
integer_t
Expand Down Expand Up @@ -2156,6 +2161,7 @@ timeval32
timex
truncate
ttyname_r
u_quad_t
ucontext_t
unmount
useconds_t
Expand Down
2 changes: 2 additions & 0 deletions libc-test/semver/dragonfly.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1587,3 +1587,5 @@ xucred
eaccess
dirname
basename
IP_RECVTTL
IPV6_RECVHOPLIMIT
1 change: 1 addition & 0 deletions libc-test/semver/linux.txt
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ AT_GID
AT_HWCAP
AT_HWCAP2
AT_IGNORE
AT_MINSIGSTKSZ
AT_NOTELF
AT_NO_AUTOMOUNT
AT_NULL
Expand Down
Loading

0 comments on commit a3805ca

Please sign in to comment.