Skip to content

Commit d9fc3ac

Browse files
authored
LLVM 18 (#123)
* 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
1 parent 90d8ffb commit d9fc3ac

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+649
-478
lines changed

.clang-format

+12
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,16 @@ AlwaysBreakAfterReturnType: None
1010

1111
IndentWidth: 4
1212
DerivePointerAlignment: false
13+
14+
# Precise control over braces alignment
15+
BreakBeforeBraces: Custom
16+
BraceWrapping:
17+
AfterClass: true
18+
AfterEnum: true
19+
AfterExternBlock: true
20+
AfterFunction: true
21+
AfterStruct: true
22+
AfterUnion: true
23+
SplitEmptyFunction: false
24+
SplitEmptyRecord: false
1325
---

.env

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
SYSROOT_VERSION=0.3.1
2-
SYSROOT_CLI_IMAGE=faasm.azurecr.io/cpp-sysroot:0.3.1
1+
SYSROOT_VERSION=0.4.0
2+
SYSROOT_CLI_IMAGE=faasm.azurecr.io/cpp-sysroot:0.4.0
33
COMPOSE_PROJECT_NAME=cpp-dev

.github/workflows/release.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,26 @@ jobs:
1212
- name: "Prune docker"
1313
run: docker system prune -f --all
1414
- name: "Get the code"
15-
uses: actions/checkout@v3
15+
uses: actions/checkout@v4
1616
with:
1717
submodules: recursive
1818
- name: "Get tag version"
1919
run: echo "TAG_VERSION=${GITHUB_REF#refs/tags/v*}" >> $GITHUB_ENV
2020
- name: "Print tag version"
2121
run: echo ${{ env.TAG_VERSION }}
2222
- name: "Set up QEMU"
23-
uses: docker/setup-qemu-action@v2
23+
uses: docker/setup-qemu-action@v3
2424
- name: "Set up Docker Buildx"
25-
uses: docker/setup-buildx-action@v2
25+
uses: docker/setup-buildx-action@v3
2626
- name: "Log in to DockerHub"
27-
uses: docker/login-action@v2
27+
uses: docker/login-action@v3
2828
with:
2929
registry: faasm.azurecr.io
3030
username: ${{ secrets.ACR_SERVICE_PRINCIPAL_ID }}
3131
password: ${{ secrets.ACR_SERVICE_PRINCIPAL_PASSWORD }}
3232
- name: "Build and push cpp-sysroot container"
3333
id: docker_build
34-
uses: docker/build-push-action@v3
34+
uses: docker/build-push-action@v5.1.0
3535
with:
3636
push: true
3737
file: docker/cpp-sysroot.dockerfile

.github/workflows/tests.yml

+11-9
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,24 @@ on:
77
branches: [main]
88
types: [opened, synchronize, reopened, ready_for_review]
99

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

15+
jobs:
1816
checks:
1917
if: github.event.pull_request.draft == false
2018
runs-on: ubuntu-latest
2119
container:
22-
image: faasm.azurecr.io/cpp-sysroot:0.3.1
20+
image: faasm.azurecr.io/cpp-sysroot:0.4.0
2321
credentials:
2422
username: ${{ secrets.ACR_SERVICE_PRINCIPAL_ID }}
2523
password: ${{ secrets.ACR_SERVICE_PRINCIPAL_PASSWORD }}
2624
steps:
2725
# --- Update code ---
2826
- name: "Checkout code"
29-
uses: actions/checkout@v3
27+
uses: actions/checkout@v4
3028
with:
3129
submodules: true
3230
# See actions/checkout#766
@@ -35,6 +33,8 @@ jobs:
3533
# --- Build libraries to wasm ---
3634
- name: "Build libfaasm"
3735
run: ./bin/inv_wrapper.sh libfaasm
36+
- name: "Build libfaasm with threads support"
37+
run: ./bin/inv_wrapper.sh libfaasm --threads
3838
- name: "Build libfaasmp"
3939
run: ./bin/inv_wrapper.sh libfaasmp
4040
- name: "Build libfaasmpi"
@@ -45,6 +45,8 @@ jobs:
4545
run: ./bin/inv_wrapper.sh libfake
4646
- name: "Build libemscripten"
4747
run: ./bin/inv_wrapper.sh libemscripten
48+
- name: "Build libemscripten with threads support"
49+
run: ./bin/inv_wrapper.sh libemscripten --threads
4850
- name: "Build zlib"
4951
run: ./bin/inv_wrapper.sh zlib
5052
# --- Build functions to wasm ---

0 commit comments

Comments
 (0)