From 990659966e14b0258a5110992735dee65333df15 Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Mon, 7 Dec 2020 12:12:11 +0900 Subject: [PATCH 1/2] Fix `thread_state64` on `aarch64-apple-darwin` --- src/unix/bsd/apple/b64/aarch64.rs | 17 +++++++++++++ src/unix/bsd/apple/b64/mod.rs | 42 +++++++++---------------------- src/unix/bsd/apple/b64/x86_64.rs | 31 +++++++++++++++++++++++ 3 files changed, 60 insertions(+), 30 deletions(-) create mode 100644 src/unix/bsd/apple/b64/aarch64.rs create mode 100644 src/unix/bsd/apple/b64/x86_64.rs diff --git a/src/unix/bsd/apple/b64/aarch64.rs b/src/unix/bsd/apple/b64/aarch64.rs new file mode 100644 index 0000000000000..27e6861217d13 --- /dev/null +++ b/src/unix/bsd/apple/b64/aarch64.rs @@ -0,0 +1,17 @@ +s! { + pub struct __darwin_mcontext64 { + pub __es: ::__darwin_x86_exception_state64, + pub __ss: __darwin_arm_thread_state64, + pub __fs: ::__darwin_x86_float_state64, + } + + pub struct __darwin_arm_thread_state64 { + pub __x: [u64; 29], + pub __fp: u64, + pub __lr: u64, + pub __sp: u64, + pub __pc: u64, + pub __cpsr: u32, + pub __pad: u32, + } +} diff --git a/src/unix/bsd/apple/b64/mod.rs b/src/unix/bsd/apple/b64/mod.rs index 0651741bb5892..0596ba5ef03d6 100644 --- a/src/unix/bsd/apple/b64/mod.rs +++ b/src/unix/bsd/apple/b64/mod.rs @@ -59,12 +59,6 @@ s! { pub uc_mcontext: mcontext_t, } - pub struct __darwin_mcontext64 { - pub __es: __darwin_x86_exception_state64, - pub __ss: __darwin_x86_thread_state64, - pub __fs: __darwin_x86_float_state64, - } - pub struct __darwin_x86_exception_state64 { pub __trapno: u16, pub __cpu: u16, @@ -72,30 +66,6 @@ s! { pub __faultvaddr: u64, } - pub struct __darwin_x86_thread_state64 { - pub __rax: u64, - pub __rbx: u64, - pub __rcx: u64, - pub __rdx: u64, - pub __rdi: u64, - pub __rsi: u64, - pub __rbp: u64, - pub __rsp: u64, - pub __r8: u64, - pub __r9: u64, - pub __r10: u64, - pub __r11: u64, - pub __r12: u64, - pub __r13: u64, - pub __r14: u64, - pub __r15: u64, - pub __rip: u64, - pub __rflags: u64, - pub __cs: u64, - pub __fs: u64, - pub __gs: u64, - } - pub struct __darwin_x86_float_state64 { pub __fpu_reserved: [::c_int; 2], __fpu_fcw: ::c_short, @@ -220,3 +190,15 @@ cfg_if! { pub use self::align::*; } } + +cfg_if! { + if #[cfg(target_arch = "x86_64")] { + mod x86_64; + pub use self::x86_64::*; + } else if #[cfg(target_arch = "aarch64")] { + mod aarch64; + pub use self::aarch64::*; + } else { + // Unknown target_arch + } +} diff --git a/src/unix/bsd/apple/b64/x86_64.rs b/src/unix/bsd/apple/b64/x86_64.rs new file mode 100644 index 0000000000000..f8bb4c8f999bc --- /dev/null +++ b/src/unix/bsd/apple/b64/x86_64.rs @@ -0,0 +1,31 @@ +s! { + pub struct __darwin_mcontext64 { + pub __es: ::__darwin_x86_exception_state64, + pub __ss: __darwin_x86_thread_state64, + pub __fs: ::__darwin_x86_float_state64, + } + + pub struct __darwin_x86_thread_state64 { + pub __rax: u64, + pub __rbx: u64, + pub __rcx: u64, + pub __rdx: u64, + pub __rdi: u64, + pub __rsi: u64, + pub __rbp: u64, + pub __rsp: u64, + pub __r8: u64, + pub __r9: u64, + pub __r10: u64, + pub __r11: u64, + pub __r12: u64, + pub __r13: u64, + pub __r14: u64, + pub __r15: u64, + pub __rip: u64, + pub __rflags: u64, + pub __cs: u64, + pub __fs: u64, + pub __gs: u64, + } +} From 36f9c1fa3a94edb63b46419f11d69b5d0d0a79da Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Sun, 13 Dec 2020 01:41:01 +0900 Subject: [PATCH 2/2] Do not stop bors on semver check --- .github/workflows/bors.yml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/.github/workflows/bors.yml b/.github/workflows/bors.yml index f6fa2fe0fe389..9682450438e5a 100644 --- a/.github/workflows/bors.yml +++ b/.github/workflows/bors.yml @@ -226,12 +226,10 @@ jobs: name: Semver Linux needs: build_channels_linux runs-on: ubuntu-20.04 + continue-on-error: true strategy: fail-fast: true steps: - - uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master - with: - github_token: "${{ secrets.GITHUB_TOKEN }}" - uses: actions/checkout@v2 - name: Setup Rust toolchain # Should update the semverver revision in semver.sh if we touch nightly ver. @@ -243,12 +241,10 @@ jobs: name: Semver macOS needs: build_channels_macos runs-on: macos-10.15 + continue-on-error: true strategy: fail-fast: true steps: - - uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master - with: - github_token: "${{ secrets.GITHUB_TOKEN }}" - uses: actions/checkout@v2 - name: Setup Rust toolchain # FIXME: Pin nightly version to make semverver compilable. @@ -291,8 +287,6 @@ jobs: docker_switch, build_channels_linux, build_channels_macos, - semver_linux, - semver_macos, docs, ] @@ -313,8 +307,6 @@ jobs: docker_switch, build_channels_linux, build_channels_macos, - semver_linux, - semver_macos, docs, ]