mirror of https://github.com/WebAssembly/wasi-sdk
Rework from native RISE runner to standard ubuntu-24.04 runner with CMake cross-compilation, following alexcrichton's preference. Changes: - ci/docker/Dockerfile.riscv64-linux: Ubuntu 24.04 with crossbuild-essential-riscv64; sets CC/CXX to riscv64-linux-gnu-gcc so CMake detects cross-compilation and LLVM builds a native tablegen before cross-compiling the rest of the toolchain. - ci/docker-build.sh: use artifact-specific Dockerfile if one exists (ci/docker/Dockerfile.<artifact>), fall back to default; make the wasmtime volume mount conditional on WASI_SDK_CI_SKIP_SYSROOT. - .github/workflows/main.yml: new riscv64-linux matrix entry on ubuntu-24.04 with cross_cmake_args (-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_SYSTEM_PROCESSOR=riscv64 -DWASI_SDK_LLDB=OFF) and WASI_SDK_CI_SKIP_SYSROOT=1; handle cross_cmake_args in the cmake flags step. WASI_SDK_CI_SKIP_SYSROOT=1: the cross-compiled clang runs on riscv64, not on the x86_64 build host, so the wasm sysroot step is skipped. WASI_SDK_LLDB=OFF: avoids cross-compiling libedit/libxml2 in this first iteration; can be re-enabled as a follow-up. Closes #607 Signed-off-by: Bruno Verachten <gounthar@gmail.com>pull/621/head
parent
249054e542
commit
0d34ab143a
@ -0,0 +1,30 @@
|
||||
# Ubuntu 24.04 is used here (rather than AlmaLinux 8) because it has
|
||||
# riscv64 cross-compilation packages in its repositories.
|
||||
FROM ubuntu:24.04
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
curl \
|
||||
ca-certificates \
|
||||
crossbuild-essential-riscv64 \
|
||||
clang \
|
||||
lld \
|
||||
python3 \
|
||||
git \
|
||||
unzip \
|
||||
cmake \
|
||||
ninja-build \
|
||||
ccache \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Set the cross-compiler as the default so that cmake picks it up via CC/CXX
|
||||
# and sets CMAKE_CROSSCOMPILING=TRUE, which causes LLVM to build a native
|
||||
# tablegen before cross-compiling the rest of the toolchain.
|
||||
ENV CC=riscv64-linux-gnu-gcc
|
||||
ENV CXX=riscv64-linux-gnu-g++
|
||||
|
||||
# Cargo needs an explicit linker when cross-compiling for riscv64.
|
||||
ENV CARGO_TARGET_RISCV64_UNKNOWN_LINUX_GNU_LINKER=riscv64-linux-gnu-gcc
|
||||
|
||||
# Tell programs to cache in a location that both isn't a `--volume` mounted root
|
||||
# and isn't `/root` in the container as that won't be writable during the build.
|
||||
ENV XDG_CACHE_HOME=/tmp/cache
|
||||
Loading…
Reference in new issue