Skip to content

Commit

Permalink
LLVM 18 (#123)
Browse files Browse the repository at this point in the history
* gh: bump code version

* faasmtools: bump llvm version

* llvm: changes for latest wasi-libc and wasi-sdk

* llvm: install libclang_rt.builitins-wasm32.a

* cmake: change system name from Wasm to WASI to align with wasi-sdk

* faasmtools: enable linker feature sign extension as it is the default in llvm>=16

* libs: install in <sysroot>/lib/wasm32-wasi and copy imports appropriately

* docker: enable some features

* libs: install libraries and headers in the right location

* llvm: fix libclanv_rt.builitins installation

* mpi: more fixes to the cmake file

* wasi: attempt at having two different targets for threads and non-threads

* func: comment out temporarily disabled functions

* func: move threaded functions to separate top-level directory

* tasks: configurable compilation for different targets

* threads: support for pthread apis

* cpython: changes to make cpython build work

* llvm: add c compiler target flag for compiler-rt build

* libs: fix use of (auto)conf with different sysroots

* more fixes

* faasmtools: change default target when building a threaded application

* llvm: bump to version 18 rc2 to fix the frontend bug with openmp

* llvm: no harm in using clang-18 to build llvm-18

* llvm: use clang-17 for native compilation

* nits: fix python formatting

* nits: fix cpp formatting

* nit: run python formatting

* func: build all threads func

* gha: skip code formatting with clang-format-17

* clang-format: fix formatting after llvm bump

* nits: clang-format passing with llvm 17

* tasks(libs): build threads/non-threads in different directories

* docker: fix strange libfaasm overwrite

* funcs: set the threads target when appropriate

* nits: self-review

* libffi: fix build by passing --host flag to configure
  • Loading branch information
csegarragonz authored Mar 12, 2024
1 parent 90d8ffb commit d9fc3ac
Show file tree
Hide file tree
Showing 61 changed files with 649 additions and 478 deletions.
12 changes: 12 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,16 @@ AlwaysBreakAfterReturnType: None

IndentWidth: 4
DerivePointerAlignment: false

# Precise control over braces alignment
BreakBeforeBraces: Custom
BraceWrapping:
AfterClass: true
AfterEnum: true
AfterExternBlock: true
AfterFunction: true
AfterStruct: true
AfterUnion: true
SplitEmptyFunction: false
SplitEmptyRecord: false
---
4 changes: 2 additions & 2 deletions .env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
SYSROOT_VERSION=0.3.1
SYSROOT_CLI_IMAGE=faasm.azurecr.io/cpp-sysroot:0.3.1
SYSROOT_VERSION=0.4.0
SYSROOT_CLI_IMAGE=faasm.azurecr.io/cpp-sysroot:0.4.0
COMPOSE_PROJECT_NAME=cpp-dev
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,26 @@ jobs:
- name: "Prune docker"
run: docker system prune -f --all
- name: "Get the code"
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive
- name: "Get tag version"
run: echo "TAG_VERSION=${GITHUB_REF#refs/tags/v*}" >> $GITHUB_ENV
- name: "Print tag version"
run: echo ${{ env.TAG_VERSION }}
- name: "Set up QEMU"
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
- name: "Set up Docker Buildx"
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: "Log in to DockerHub"
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: faasm.azurecr.io
username: ${{ secrets.ACR_SERVICE_PRINCIPAL_ID }}
password: ${{ secrets.ACR_SERVICE_PRINCIPAL_PASSWORD }}
- name: "Build and push cpp-sysroot container"
id: docker_build
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5.1.0
with:
push: true
file: docker/cpp-sysroot.dockerfile
Expand Down
20 changes: 11 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,24 @@ on:
branches: [main]
types: [opened, synchronize, reopened, ready_for_review]

jobs:
# Cancel previous running actions for the same PR
cancel_previous:
runs-on: ubuntu-latest
steps:
- name: Cancel Workflow Action
uses: styfle/[email protected]
# Cancel previous running actions for the same PR
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
checks:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
container:
image: faasm.azurecr.io/cpp-sysroot:0.3.1
image: faasm.azurecr.io/cpp-sysroot:0.4.0
credentials:
username: ${{ secrets.ACR_SERVICE_PRINCIPAL_ID }}
password: ${{ secrets.ACR_SERVICE_PRINCIPAL_PASSWORD }}
steps:
# --- Update code ---
- name: "Checkout code"
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true
# See actions/checkout#766
Expand All @@ -35,6 +33,8 @@ jobs:
# --- Build libraries to wasm ---
- name: "Build libfaasm"
run: ./bin/inv_wrapper.sh libfaasm
- name: "Build libfaasm with threads support"
run: ./bin/inv_wrapper.sh libfaasm --threads
- name: "Build libfaasmp"
run: ./bin/inv_wrapper.sh libfaasmp
- name: "Build libfaasmpi"
Expand All @@ -45,6 +45,8 @@ jobs:
run: ./bin/inv_wrapper.sh libfake
- name: "Build libemscripten"
run: ./bin/inv_wrapper.sh libemscripten
- name: "Build libemscripten with threads support"
run: ./bin/inv_wrapper.sh libemscripten --threads
- name: "Build zlib"
run: ./bin/inv_wrapper.sh zlib
# --- Build functions to wasm ---
Expand Down
Loading

0 comments on commit d9fc3ac

Please sign in to comment.