Skip to content

Commit 7446927

Browse files
committed
Fix builders
1 parent 63f0326 commit 7446927

File tree

6 files changed

+10
-9
lines changed

6 files changed

+10
-9
lines changed

Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Builds the Rust library libwasmvm
2-
BUILDERS_PREFIX := cosmwasm/libwasmvm-builder:0102
2+
BUILDERS_PREFIX := cosmwasm/libwasmvm-builder:0103
33
# Contains a full Go dev environment including CGO support in order to run Go tests on the built shared library
44
# This image is currently not published.
55
ALPINE_TESTER := cosmwasm/alpine-tester:local
@@ -76,7 +76,11 @@ bench:
7676
# Creates a release build in a containerized build environment of the static library for Alpine Linux (.a)
7777
release-build-alpine:
7878
# build the muslc *.a file
79-
docker run --rm -v $(shell pwd)/libwasmvm:/code $(BUILDERS_PREFIX)-alpine
79+
docker run --rm -v $(shell pwd)/libwasmvm:/code \
80+
-e CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER=aarch64-linux-musl-gcc \
81+
-e CC_aarch64_unknown_linux_musl=aarch64-linux-musl-gcc \
82+
-e CFLAGS_aarch64_unknown_linux_musl="" \
83+
$(BUILDERS_PREFIX)-alpine
8084
cp libwasmvm/artifacts/libwasmvm_muslc.x86_64.a internal/api
8185
cp libwasmvm/artifacts/libwasmvm_muslc.aarch64.a internal/api
8286
make update-bindings

builders/Dockerfile.alpine

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM --platform=linux/amd64 rust:1.82.0-alpine
22

3-
RUN apk add --no-cache ca-certificates build-base
3+
RUN apk add --no-cache ca-certificates build-base llvm17-dev clang17-static
44

55
# Install C compiler for cross-compilation. This is required by
66
# Wasmer in https://github.com/wasmerio/wasmer/blob/2.2.1/lib/vm/build.rs.

builders/Dockerfile.debian

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
FROM --platform=linux/amd64 debian:11-slim
55

66
RUN apt update -y \
7-
&& apt install -y gcc make gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu wget
7+
&& apt install -y gcc make gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu wget clang
88

99
# GET FROM https://github.com/rust-lang/docker-rust-nightly
1010
ENV RUSTUP_HOME=/usr/local/rustup \

builders/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Versioned by a simple counter that is not bound to a specific CosmWasm version
22
# See builders/README.md
3-
BUILDERS_PREFIX := cosmwasm/libwasmvm-builder:0102
3+
BUILDERS_PREFIX := cosmwasm/libwasmvm-builder:0103
44

55
.PHONY: docker-image-debian
66
docker-image-debian:

builders/guest/build_gnu_aarch64.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ export TARGET_DIR="/target" # write to /target in the guest's file system to avo
77
# No stripping implemented (see https://github.com/CosmWasm/wasmvm/issues/222#issuecomment-2260007943).
88

99
echo "Starting aarch64-unknown-linux-gnu build"
10-
export CC=clang
11-
export CXX=clang++
1210
export qemu_aarch64="qemu-aarch64 -L /usr/aarch64-linux-gnu"
1311
export CC_aarch64_unknown_linux_gnu=clang
1412
export AR_aarch64_unknown_linux_gnu=llvm-ar

builders/guest/build_muslc.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@ export TARGET_DIR="/target" # write to /target in the guest's file system to avo
77
# No stripping implemented (see https://github.com/CosmWasm/wasmvm/issues/222#issuecomment-2260007943).
88

99
echo "Starting aarch64-unknown-linux-musl build"
10-
export CC=/opt/aarch64-linux-musl-cross/bin/aarch64-linux-musl-gcc
10+
export CC_aarch64_unknown_linux_musl=/opt/aarch64-linux-musl-cross/bin/aarch64-linux-musl-gcc
1111
cargo build --release --target-dir="$TARGET_DIR" --target aarch64-unknown-linux-musl --example wasmvmstatic
12-
unset CC
1312

1413
echo "Starting x86_64-unknown-linux-musl build"
1514
cargo build --release --target-dir="$TARGET_DIR" --target x86_64-unknown-linux-musl --example wasmvmstatic

0 commit comments

Comments
 (0)