Skip to content

Commit c542d80

Browse files
committed
ci: Add dist-aarch64-freebsd
Add scripts to build the aarch64-unknown-freebsd target in CI. Implements MCP: rust-lang/compiler-team#961
1 parent 5ea817c commit c542d80

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-linux-4c
266+
264267
- name: dist-x86_64-illumos
265268
<<: *job-linux-4c
266269

0 commit comments

Comments
 (0)