Skip to content

Commit d14790a

Browse files
Rollup merge of #154265 - mrkajetanp:freebsd-aarch64-ci, r=marcoieni
ci: Add dist-aarch64-freebsd Add scripts to build the aarch64-unknown-freebsd target in CI. Implements MCP: rust-lang/compiler-team#961 There is currently the issue of FreeBSD version support. See the following thread for more details: #132228 The current version supported by rust is FreeBSD 12, which is already EOL. This means it is no longer possible to download FreeBSD releases from their servers. The aarch64 build is not mirrored on the Rust servers, which is why I couldn't match the version used by already existing CI scripts and had to change this one to FreeBSD 13. FreeBSD 13 itself will be EOL a month from now, on April 30th. We might want to put aarch64 FreeBSD builds on the Rust mirror and update the support across the board to FreeBSD 14 prior to merging this.
2 parents 60592ad + 52b5f55 commit d14790a

3 files changed

Lines changed: 48 additions & 0 deletions

File tree

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
FROM ubuntu:26.04
2+
3+
RUN apt-get update && apt-get install -y --no-install-recommends \
4+
clang \
5+
make \
6+
ninja-build \
7+
file \
8+
curl \
9+
ca-certificates \
10+
python3 \
11+
git \
12+
cmake \
13+
sudo \
14+
bzip2 \
15+
xz-utils \
16+
texinfo \
17+
wget \
18+
libssl-dev \
19+
pkg-config \
20+
&& rm -rf /var/lib/apt/lists/*
21+
22+
COPY scripts/freebsd-toolchain.sh /tmp/
23+
RUN /tmp/freebsd-toolchain.sh aarch64
24+
25+
COPY scripts/sccache.sh /scripts/
26+
RUN sh /scripts/sccache.sh
27+
28+
COPY scripts/cmake.sh /scripts/
29+
RUN /scripts/cmake.sh
30+
31+
ENV \
32+
AR_aarch64_unknown_freebsd=aarch64-unknown-freebsd14-ar \
33+
CC_aarch64_unknown_freebsd=aarch64-unknown-freebsd14-clang \
34+
CXX_aarch64_unknown_freebsd=aarch64-unknown-freebsd14-clang++
35+
36+
ENV HOSTS=aarch64-unknown-freebsd
37+
38+
ENV RUST_CONFIGURE_ARGS="--enable-full-tools \
39+
--enable-extended \
40+
--enable-profiler \
41+
--enable-sanitizers \
42+
--disable-docs"
43+
44+
ENV SCRIPT="python3 ../x.py dist --host $HOSTS --target $HOSTS"

src/ci/docker/scripts/freebsd-toolchain.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ mkdir -p "$sysroot"
4646
case $arch in
4747
(x86_64) freebsd_arch=amd64 ;;
4848
(i686) freebsd_arch=i386 ;;
49+
(aarch64) freebsd_arch=arm64 ;;
4950
esac
5051

5152
files_to_extract=(

src/ci/github-actions/jobs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,9 @@ auto:
261261
- name: dist-x86_64-freebsd
262262
<<: *job-linux-4c
263263

264+
- name: dist-aarch64-freebsd
265+
<<: *job-aarch64-linux
266+
264267
- name: dist-x86_64-illumos
265268
<<: *job-linux-4c
266269

0 commit comments

Comments
 (0)