diff --git a/.env b/.env index 97bd499..fb0179c 100644 --- a/.env +++ b/.env @@ -1,3 +1,3 @@ -SYSROOT_VERSION=0.7.0 -SYSROOT_CLI_IMAGE=ghcr.io/faasm/cpp-sysroot:0.7.0 +SYSROOT_VERSION=0.8.0 +SYSROOT_CLI_IMAGE=ghcr.io/faasm/cpp-sysroot:0.8.0 COMPOSE_PROJECT_NAME=cpp-dev diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 204bf88..aa964be 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -17,7 +17,7 @@ jobs: if: github.event.pull_request.draft == false runs-on: ubuntu-latest container: - image: ghcr.io/faasm/cpp-sysroot:0.7.0 + image: ghcr.io/faasm/cpp-sysroot:0.8.0 steps: # --- Update code --- - name: "Checkout code" diff --git a/VERSION b/VERSION index faef31a..a3df0a6 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.7.0 +0.8.0 diff --git a/docker/cpp-sysroot.dockerfile b/docker/cpp-sysroot.dockerfile index f6c9b6c..7298909 100644 --- a/docker/cpp-sysroot.dockerfile +++ b/docker/cpp-sysroot.dockerfile @@ -1,17 +1,44 @@ # llvm image is not re-built often, so the tag may be behind FROM ghcr.io/faasm/llvm:0.7.0 AS llvm -# faabric-base image is not re-built often, so tag may be behind -FROM ghcr.io/faasm/faabric-base:0.21.0 +# Start from a fresh ubuntu image, cpp-sysroot has little built deps. +FROM ubuntu:24.04 + +RUN apt update \ + && apt install -y --no-install-recommends \ + autoconf \ + automake \ + autopoint \ + autotools-dev \ + clang-17 \ + clang-format-17 \ + cmake \ + dpkg-dev \ + gawk \ + gettext \ + git \ + libltdl-dev \ + libtool \ + llvm-17 \ + make \ + m4 \ + ninja-build \ + pkg-config \ + python3-pip \ + python3-venv \ + vim-tiny \ + && apt autoremove \ + && rm -rf /var/lib/apt/lists/* + SHELL ["/bin/bash", "-c"] ENV CPP_DOCKER="on" -# Copy the toolchain and LLVM sources from the LLVM container +# Copy the toolchain and LLVM OpenMP sources necessary to build libfaasmp COPY --from=llvm /usr/local/faasm /usr/local/faasm -COPY --from=llvm /opt/llvm-project /opt/llvm-project +COPY --from=llvm \ + /opt/llvm-project/build/llvm/projects/openmp/runtime/src \ + /opt/llvm-project/build/llvm/projects/openmp/runtime/src -# Update APT dependencies -RUN apt update && apt install -y autotools-dev # Get the code and submodules ARG SYSROOT_VERSION RUN mkdir -p /code \ @@ -42,9 +69,6 @@ RUN cd /code/cpp \ libfaasmpi --native --shared \ # Install toolchain files && inv install \ - # Build wasi-libc and reset the sysroot. The second call to LLVM just - # installs some headers that are purged - && inv llvm.libc --purge llvm \ # Build Faasm WASM libraries for wasm32-wasi target && inv \ libfaasm \ diff --git a/libfaasmp/CMakeLists.txt b/libfaasmp/CMakeLists.txt index 3b251b1..239a03b 100644 --- a/libfaasmp/CMakeLists.txt +++ b/libfaasmp/CMakeLists.txt @@ -16,7 +16,6 @@ set(LIB_FILES if (CMAKE_SYSTEM_NAME STREQUAL "WASI") message(STATUS "Libfaasmp WebAssembly build") - set(LLVM_OMP_SRC_DIR "/opt/llvm-project/openmp/runtime/src") set(LLVM_OMP_BUILD_SRC_DIR "/opt/llvm-project/build/llvm/projects/openmp/runtime/src") set(LIBOMP_ASMFILES "z_Linux_asm.S") set(LIBOMP_HEADERS "${LLVM_OMP_BUILD_SRC_DIR}/omp.h")