Skip to content

Commit 36c8345

Browse files
committed
macOs various updates.
- CI only for macOs arm64. - Fixing build issues for macOs arm64. - Adding macos cpu to arch api.
1 parent 3d0b15b commit 36c8345

File tree

4 files changed

+13
-16
lines changed

4 files changed

+13
-16
lines changed

.github/workflows/full_ci.yml

+6-6
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
@@ -218,10 +218,10 @@ jobs:
218218
max-parallel: 4
219219
matrix:
220220
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 }
221+
- { toolchain: stable, os: macos-14 }
222+
- { toolchain: beta, os: macos-14 }
223+
- { toolchain: nightly, os: macos-14 }
224+
- { toolchain: 1.71.0, os: macos-14 }
225225
runs-on: ${{ matrix.target.os }}
226226
steps:
227227
- uses: actions/checkout@v4

ci/build.sh

-2
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="\

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 (alternate name for [__int128][])
97+
pub type __int128_t = i128;
98+
/// C __uint128_t (alternate name for [__uint128][])
99+
pub type __uint128_t = u128;
95100
}
96101
}

src/unix/bsd/apple/mod.rs

+1-7
Original file line numberDiff line numberDiff line change
@@ -491,8 +491,7 @@ s! {
491491
pub rmx_rtt: u32,
492492
pub rmx_rttvar: u32,
493493
pub rmx_pksent: u32,
494-
pub rmx_state: u32,
495-
pub rmx_filler: [u32; 3],
494+
pub rmx_filler: [u32; 4],
496495
}
497496

498497
pub struct rt_msghdr {
@@ -6113,7 +6112,6 @@ extern "C" {
61136112
out_processor_infoCnt: *mut mach_msg_type_number_t,
61146113
) -> ::kern_return_t;
61156114

6116-
pub static mut mach_task_self_: ::mach_port_t;
61176115
pub fn task_for_pid(
61186116
host: ::mach_port_t,
61196117
pid: ::pid_t,
@@ -6230,10 +6228,6 @@ extern "C" {
62306228
) -> ::c_int;
62316229
}
62326230

6233-
pub unsafe fn mach_task_self() -> ::mach_port_t {
6234-
mach_task_self_
6235-
}
6236-
62376231
cfg_if! {
62386232
if #[cfg(target_os = "macos")] {
62396233
extern "C" {

0 commit comments

Comments
 (0)