-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathCross.toml
More file actions
47 lines (42 loc) · 2.36 KB
/
Cross.toml
File metadata and controls
47 lines (42 loc) · 2.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
[build.env]
passthrough = ["GITHUB_TOKEN", "RUSTC_WRAPPER", "AWS_LC_SYS_CMAKE_BUILDER"]
# Use 'edge' images which are based on newer Ubuntu (not 16.04/xenial).
# The default cross images (0.2.5/latest) are based on Ubuntu 16.04 which:
# 1. Has no lld package available
# 2. Has binutils too old for armv8.4-a assembly instructions (aws-lc-sys)
# The edge images are based on Ubuntu 22.04+ and have modern toolchains.
#
# APT mirror note: GitHub Actions runs on Azure infrastructure. The default
# archive.ubuntu.com mirror is geographically distant and can time out.
# We switch to azure.archive.ubuntu.com (a Microsoft-maintained mirror that
# is co-located with the Azure runners) for reliable package downloads.
# The `|| true` fallback means the sed never blocks the build even when
# running on non-Ubuntu base images or images with no sources.list.
[target.aarch64-unknown-linux-gnu]
image = "ghcr.io/cross-rs/aarch64-unknown-linux-gnu:edge"
pre-build = [
"sed -i 's|http://archive.ubuntu.com|http://azure.archive.ubuntu.com|g; s|http://security.ubuntu.com|http://azure.archive.ubuntu.com|g' /etc/apt/sources.list 2>/dev/null || true",
"apt-get update -y && apt-get install -y --no-install-recommends cmake g++ pkg-config",
]
[target.x86_64-unknown-linux-musl]
image = "ghcr.io/cross-rs/x86_64-unknown-linux-musl:edge"
pre-build = [
"sed -i 's|http://archive.ubuntu.com|http://azure.archive.ubuntu.com|g; s|http://security.ubuntu.com|http://azure.archive.ubuntu.com|g' /etc/apt/sources.list 2>/dev/null || true",
"apt-get update -y && apt-get install -y --no-install-recommends cmake g++ pkg-config",
]
[target.aarch64-unknown-linux-musl]
image = "ghcr.io/cross-rs/aarch64-unknown-linux-musl:edge"
pre-build = [
"sed -i 's|http://archive.ubuntu.com|http://azure.archive.ubuntu.com|g; s|http://security.ubuntu.com|http://azure.archive.ubuntu.com|g' /etc/apt/sources.list 2>/dev/null || true",
"apt-get update -y && apt-get install -y --no-install-recommends cmake g++ pkg-config",
]
# workaround for https://github.com/cross-rs/cross/issues/1345
[target.x86_64-unknown-netbsd]
pre-build = [
"mkdir -p /tmp/netbsd",
"curl https://archive.netbsd.org/pub/NetBSD-archive/NetBSD-9.2/amd64/binary/sets/base.tar.xz -O",
"tar -C /tmp/netbsd -xJf base.tar.xz",
"cp /tmp/netbsd/usr/lib/libexecinfo.so /usr/local/x86_64-unknown-netbsd/lib",
"rm base.tar.xz",
"rm -rf /tmp/netbsd",
]