Skip to content

Commit

Permalink
Fix nasm in cross build #933
Browse files Browse the repository at this point in the history
  • Loading branch information
joepio committed Aug 21, 2024
1 parent 3183a68 commit a01de57
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
18 changes: 18 additions & 0 deletions Cross.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# [target.aarch64-unknown-linux-gnu]
# pre-build = [
# "dpkg --add-architecture $CROSS_DEB_ARCH",
# "apt-get update",
# "apt-get install --assume-yes nasm:$CROSS_DEB_ARCH",
# ]
[target.x86_64-unknown-linux-musl]
pre-build = [
"dpkg --add-architecture $CROSS_DEB_ARCH",
"apt-get update",
"apt-get install --assume-yes nasm",
]
# [target.armv7-unknown-linux-musleabihf]
# pre-build = [
# "dpkg --add-architecture $CROSS_DEB_ARCH",
# "apt-get update",
# "apt-get install --assume-yes nasm:$CROSS_DEB_ARCH",
# ]
4 changes: 3 additions & 1 deletion Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ docker-all:

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

source:
FROM +install
COPY --keep-ts Cargo.toml Cargo.lock ./
COPY --keep-ts Cargo.toml Cargo.lock Cross.toml ./
COPY --keep-ts --dir server lib cli ./
COPY browser+build/dist /code/server/assets_tmp
DO rust+CARGO --args=fetch
Expand All @@ -67,6 +68,7 @@ test:

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

0 comments on commit a01de57

Please sign in to comment.