Skip to content

Commit a01de57

Browse files
committed
Fix nasm in cross build #933
1 parent 3183a68 commit a01de57

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

Cross.toml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# [target.aarch64-unknown-linux-gnu]
2+
# pre-build = [
3+
# "dpkg --add-architecture $CROSS_DEB_ARCH",
4+
# "apt-get update",
5+
# "apt-get install --assume-yes nasm:$CROSS_DEB_ARCH",
6+
# ]
7+
[target.x86_64-unknown-linux-musl]
8+
pre-build = [
9+
"dpkg --add-architecture $CROSS_DEB_ARCH",
10+
"apt-get update",
11+
"apt-get install --assume-yes nasm",
12+
]
13+
# [target.armv7-unknown-linux-musleabihf]
14+
# pre-build = [
15+
# "dpkg --add-architecture $CROSS_DEB_ARCH",
16+
# "apt-get update",
17+
# "apt-get install --assume-yes nasm:$CROSS_DEB_ARCH",
18+
# ]

Earthfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ docker-all:
3333

3434
install:
3535
RUN apt-get update -qq
36+
# Libraries that we install here, may also need to be added to `Cross.toml`
3637
# NASM is required for the image library
3738
RUN apt install nasm
3839
RUN rustup component add clippy
@@ -42,7 +43,7 @@ install:
4243

4344
source:
4445
FROM +install
45-
COPY --keep-ts Cargo.toml Cargo.lock ./
46+
COPY --keep-ts Cargo.toml Cargo.lock Cross.toml ./
4647
COPY --keep-ts --dir server lib cli ./
4748
COPY browser+build/dist /code/server/assets_tmp
4849
DO rust+CARGO --args=fetch
@@ -67,6 +68,7 @@ test:
6768

6869
cross-build:
6970
FROM +source
71+
# The TARGETs may need custom libraries defined in `atomic-server/Cross.toml`
7072
ARG --required TARGET
7173
DO rust+SET_CACHE_MOUNTS_ENV
7274
DO rust+CROSS --target ${TARGET}

0 commit comments

Comments
 (0)