Skip to content

Commit f3262e6

Browse files
authored
Merge pull request #3797 from tgross35/ci-fixes
Combined CI fixes
2 parents 0e28c86 + 77e9d06 commit f3262e6

File tree

7 files changed

+30
-59
lines changed

7 files changed

+30
-59
lines changed

.github/workflows/full_ci.yml

+6-47
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ jobs:
3131
contents: read # to fetch code (actions/checkout)
3232

3333
name: macOS
34-
runs-on: macos-13
34+
runs-on: macos-14
3535
strategy:
3636
fail-fast: true
3737
matrix:
3838
target: [
39-
x86_64-apple-darwin,
39+
aarch64-apple-darwin,
4040
]
4141
steps:
4242
- uses: actions/checkout@v4
@@ -140,45 +140,6 @@ jobs:
140140
- name: Execute run-docker.sh
141141
run: LIBC_CI=1 sh ./ci/run-docker.sh ${{ matrix.target }}
142142

143-
# These targets are tier 3 or otherwise need to have CI build std via -Zbuild-std.
144-
# Because of this, only the nightly compiler can be used on these targets.
145-
docker_linux_build_std:
146-
permissions:
147-
contents: read # to fetch code (actions/checkout)
148-
149-
if: ${{ false }} # This is currently broken
150-
name: Docker Linux Build-Std Targets
151-
needs: [docker_linux_tier1, style_check]
152-
runs-on: ubuntu-22.04
153-
strategy:
154-
fail-fast: true
155-
max-parallel: 12
156-
matrix:
157-
target: [
158-
armv7-unknown-linux-uclibceabihf
159-
]
160-
steps:
161-
- uses: actions/checkout@v4
162-
- name: Setup Rust toolchain
163-
run: TOOLCHAIN=nightly INSTALL_RUST_SRC=1 sh ./ci/install-rust.sh
164-
- name: Execute run-docker.sh
165-
run: LIBC_CI=1 TOOLCHAIN=nightly LIBC_CI_ZBUILD_STD=1 sh ./ci/run-docker.sh ${{ matrix.target }}
166-
167-
# devkitpro's pacman needs to be connected from Docker.
168-
docker_switch:
169-
permissions:
170-
contents: read # to fetch code (actions/checkout)
171-
172-
name: Docker Switch
173-
needs: [docker_linux_tier1, style_check]
174-
runs-on: ubuntu-22.04
175-
steps:
176-
- uses: actions/checkout@v4
177-
- name: Setup Rust toolchain
178-
run: sh ./ci/install-rust.sh
179-
- name: Execute run-docker.sh
180-
run: LIBC_CI=1 sh ./ci/run-docker.sh switch
181-
182143
build_channels_linux:
183144
permissions:
184145
contents: read # to fetch code (actions/checkout)
@@ -218,10 +179,10 @@ jobs:
218179
max-parallel: 4
219180
matrix:
220181
target:
221-
- { toolchain: stable, os: macos-13 }
222-
- { toolchain: beta, os: macos-13 }
223-
- { toolchain: nightly, os: macos-13 }
224-
- { toolchain: 1.71.0, os: macos-13 }
182+
- { toolchain: stable, os: macos-14 }
183+
- { toolchain: beta, os: macos-14 }
184+
- { toolchain: nightly, os: macos-14 }
185+
- { toolchain: 1.71.0, os: macos-14 }
225186
runs-on: ${{ matrix.target.os }}
226187
steps:
227188
- uses: actions/checkout@v4
@@ -275,11 +236,9 @@ jobs:
275236
needs: [
276237
docker_linux_tier1,
277238
docker_linux_tier2,
278-
#docker_linux_build_std,
279239
macos,
280240
windows,
281241
style_check,
282-
docker_switch,
283242
build_channels_linux,
284243
build_channels_macos,
285244
build_channels_windows,

Cargo.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ targets = [
4747
"armv7-wrs-vxworks-eabihf",
4848
"armv7r-none-eabi",
4949
"armv7r-none-eabihf",
50-
"hexagon-unknown-linux-musl",
50+
# FIXME(hexagon): excluded due to duplicate symbol errors
51+
# "hexagon-unknown-linux-musl",
5152
"i586-pc-windows-msvc",
5253
"i586-unknown-linux-gnu",
5354
"i586-unknown-linux-musl",

ci/build.sh

+2-3
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,6 @@ x86_64-unknown-redox \
147147

148148
RUST_APPLE_TARGETS="\
149149
aarch64-apple-ios \
150-
x86_64-apple-darwin \
151-
x86_64-apple-ios \
152150
"
153151

154152
RUST_NIGHTLY_APPLE_TARGETS="\
@@ -211,6 +209,8 @@ for TARGET in $TARGETS; do
211209
done
212210

213211
# Targets which are not available via rustup and must be built with -Zbuild-std
212+
# FIXME(hexagon): hexagon-unknown-linux-musl should be tested but currently has
213+
# duplicate symbol errors from `compiler_builtins`.
214214
RUST_LINUX_NO_CORE_TARGETS="\
215215
aarch64-pc-windows-msvc \
216216
aarch64-unknown-freebsd \
@@ -223,7 +223,6 @@ armebv7r-none-eabihf \
223223
armv7-wrs-vxworks-eabihf \
224224
armv7r-none-eabi \
225225
armv7r-none-eabihf \
226-
hexagon-unknown-linux-musl \
227226
i586-pc-windows-msvc \
228227
i686-pc-windows-msvc \
229228
i686-unknown-haiku \

libc-test/build.rs

+8
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,8 @@ fn test_apple(target: &str) {
294294
"tcp_connection_info" => true,
295295
// FIXME: The size is changed in recent macOSes.
296296
"malloc_introspection_t" => true,
297+
// sonoma changes the padding `rmx_filler` field.
298+
"rt_metrics" => true,
297299

298300
_ => false,
299301
}
@@ -2215,6 +2217,12 @@ fn test_freebsd(target: &str) {
22152217
// should've been used anywhere anyway.
22162218
"TDF_UNUSED23" => true,
22172219

2220+
// Removed in FreeBSD 15
2221+
"TDF_CANSWAP" | "TDF_SWAPINREQ" => true,
2222+
2223+
// Unaccessible in FreeBSD 15
2224+
"TDI_SWAPPED" | "P_SWAPPINGOUT" | "P_SWAPPINGIN" => true,
2225+
22182226
// Removed in FreeBSD 14 (git a6b55ee6be1)
22192227
"IFF_KNOWSEPOCH" => true,
22202228

src/fixed_width_ints.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ pub type uint32_t = u32;
2020
pub type uint64_t = u64;
2121

2222
cfg_if! {
23-
if #[cfg(all(target_arch = "aarch64", not(target_os = "windows")))] {
23+
if #[cfg(all(target_arch = "aarch64", not(any(target_os = "windows", target_os = "macos", target_os = "ios", target_os = "tvos", target_os = "watchos"))))] {
2424
// This introduces partial support for FFI with __int128 and
2525
// equivalent types on platforms where Rust's definition is validated
2626
// to match the standard C ABI of that platform.
@@ -92,5 +92,10 @@ cfg_if! {
9292

9393
// static_assert_eq!(core::mem::size_of::<__uint128_t>(), _SIZE_128);
9494
// static_assert_eq!(core::mem::align_of::<__uint128_t>(), _ALIGN_128);
95+
} else if #[cfg(all(target_arch = "aarch64", any(target_os = "macos", target_os = "ios", target_os = "tvos", target_os = "watchos")))] {
96+
/// /// C `__int128_t`
97+
pub type __int128_t = i128;
98+
/// /// C `__uint128_t`
99+
pub type __uint128_t = u128;
95100
}
96101
}

src/unix/bsd/apple/mod.rs

+1-7
Original file line numberDiff line numberDiff line change
@@ -493,8 +493,7 @@ s! {
493493
pub rmx_rtt: u32,
494494
pub rmx_rttvar: u32,
495495
pub rmx_pksent: u32,
496-
pub rmx_state: u32,
497-
pub rmx_filler: [u32; 3],
496+
pub rmx_filler: [u32; 4],
498497
}
499498

500499
pub struct rt_msghdr {
@@ -6296,7 +6295,6 @@ extern "C" {
62966295
out_processor_infoCnt: *mut mach_msg_type_number_t,
62976296
) -> ::kern_return_t;
62986297

6299-
pub static mut mach_task_self_: ::mach_port_t;
63006298
pub fn task_for_pid(
63016299
host: ::mach_port_t,
63026300
pid: ::pid_t,
@@ -6413,10 +6411,6 @@ extern "C" {
64136411
) -> ::c_int;
64146412
}
64156413

6416-
pub unsafe fn mach_task_self() -> ::mach_port_t {
6417-
mach_task_self_
6418-
}
6419-
64206414
cfg_if! {
64216415
if #[cfg(target_os = "macos")] {
64226416
extern "C" {

src/wasi.rs

+5
Original file line numberDiff line numberDiff line change
@@ -369,10 +369,15 @@ pub const _SC_PAGE_SIZE: ::c_int = _SC_PAGESIZE;
369369
pub const _SC_IOV_MAX: c_int = 60;
370370
pub const _SC_SYMLOOP_MAX: c_int = 173;
371371

372+
// unsafe code here is required in the stable, but not in nightly
373+
#[allow(unused_unsafe)]
372374
pub static CLOCK_MONOTONIC: clockid_t = unsafe { clockid_t(ptr_addr_of!(_CLOCK_MONOTONIC)) };
375+
#[allow(unused_unsafe)]
373376
pub static CLOCK_PROCESS_CPUTIME_ID: clockid_t =
374377
unsafe { clockid_t(ptr_addr_of!(_CLOCK_PROCESS_CPUTIME_ID)) };
378+
#[allow(unused_unsafe)]
375379
pub static CLOCK_REALTIME: clockid_t = unsafe { clockid_t(ptr_addr_of!(_CLOCK_REALTIME)) };
380+
#[allow(unused_unsafe)]
376381
pub static CLOCK_THREAD_CPUTIME_ID: clockid_t =
377382
unsafe { clockid_t(ptr_addr_of!(_CLOCK_THREAD_CPUTIME_ID)) };
378383

0 commit comments

Comments
 (0)