Skip to content

Commit

Permalink
Cross-compile for aarch64-linux.
Browse files Browse the repository at this point in the history
This architecture has a different c_char: u8, rather than i8.

Due to rust-lang/rust#113735, this causes a
build breakage, since CStr::from_ptr was documented to take an i8 but
actually takes a c_char.
  • Loading branch information
mutexlox-signal committed Oct 2, 2024
1 parent dff28a9 commit e844dc1
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,24 @@ jobs:
shell: bash
run: rustup run ${{ matrix.rust }} cargo run -p systest

build_arm_linux:
name: Cross-compile for aarch64 linux

runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
with:
submodules: recursive

- name: Install Rust
shell: bash
run: rustup target add aarch64-unknown-linux-gnu

- name: Install crossbuild headers
shell: bash
run: sudo apt-get update && sudo apt-get install -y crossbuild-essential-arm64

- name: Build cross compile aarch64
shell: bash
run: cargo build --all --target aarch64-unknown-linux-gnu

0 comments on commit e844dc1

Please sign in to comment.