Skip to content

Commit 3b1ebc9

Browse files
committed
also build on x86-32 an arm-32
1 parent 0f90ef2 commit 3b1ebc9

File tree

4 files changed

+17
-13
lines changed

4 files changed

+17
-13
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,13 @@ jobs:
2121
include:
2222
- host_target: x86_64-unknown-linux-gnu
2323
os: ubuntu-latest
24-
# Needs a libffi patch: <https://github.com/libffi-rs/libffi-rs/pull/160>
25-
# - host_target: i686-unknown-linux-gnu
26-
# os: ubuntu-latest
24+
- host_target: i686-unknown-linux-gnu
25+
os: ubuntu-latest
2726
- host_target: aarch64-unknown-linux-gnu
2827
os: ubuntu-24.04-arm
2928
# Disabled due to <https://github.com/rust-lang/rust/issues/143184>.
30-
# - host_target: armv7-unknown-linux-gnueabihf
31-
# os: ubuntu-24.04-arm
29+
- host_target: armv7-unknown-linux-gnueabihf
30+
os: ubuntu-24.04-arm
3231
- host_target: aarch64-apple-darwin
3332
os: macos-latest
3433
- host_target: i686-pc-windows-msvc
@@ -43,13 +42,16 @@ jobs:
4342
run: |
4443
sudo dpkg --add-architecture i386
4544
sudo apt update
46-
sudo apt install gcc-multilib zlib1g-dev:i386 libffi-dev:i386
45+
sudo apt install gcc-i686-linux-gnu gcc-multilib zlib1g-dev:i386 libffi-dev:i386
46+
echo "CC=i686-linux-gnu-gcc" >> $GITHUB_ENV
4747
- name: Install multilib dependencies
4848
if: ${{ matrix.host_target == 'armv7-unknown-linux-gnueabihf' }}
4949
run: |
5050
sudo dpkg --add-architecture armhf
5151
sudo apt update
5252
sudo apt install gcc-arm-linux-gnueabihf zlib1g-dev:armhf libffi-dev:armhf
53+
echo "CC=arm-linux-gnueabihf-gcc" >> $GITHUB_ENV
54+
echo '[target.armv7-unknown-linux-gnueabihf] linker = "arm-linux-gnueabihf-gcc"' >> .cargo/config.toml
5355
- uses: ./.github/workflows/setup
5456
with:
5557
toolchain_flags: "--host ${{ matrix.host_target }}"

Cargo.lock

Lines changed: 4 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ features = ['unprefixed_malloc_on_supported_platforms']
3737

3838
[target.'cfg(unix)'.dependencies]
3939
libc = "0.2"
40-
libffi = "4.0.0"
40+
libffi = { git = "https://github.com/RalfJung/libffi-rs", branch = "multilib" }
4141
libloading = "0.8"
4242

4343
[target.'cfg(target_os = "linux")'.dependencies]

ci/ci.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,10 @@ case $HOST_TARGET in
146146
MANY_SEEDS=64 TEST_TARGET=x86_64-apple-darwin run_tests
147147
MANY_SEEDS=64 TEST_TARGET=x86_64-pc-windows-gnu run_tests
148148
;;
149+
i686-unknown-linux-gnu)
150+
# Host
151+
GC_STRESS=1 MIR_OPT=1 MANY_SEEDS=64 TEST_BENCH=1 CARGO_MIRI_ENV=1 run_tests
152+
;;
149153
aarch64-unknown-linux-gnu)
150154
# Host
151155
GC_STRESS=1 MIR_OPT=1 MANY_SEEDS=64 TEST_BENCH=1 CARGO_MIRI_ENV=1 run_tests

0 commit comments

Comments
 (0)