Skip to content

Commit 514ae53

Browse files
committed
Add CI checks with GC disabled
add workaround for the apple compiler saying `__ARM_FEATURE_DOTPROD` is supported when it is not. Signed-off-by: Máté Tokodi [email protected]
1 parent 4e663f6 commit 514ae53

File tree

3 files changed

+67
-1
lines changed

3 files changed

+67
-1
lines changed

.github/workflows/actions.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,70 @@ jobs:
362362
run: |
363363
$RUNNER --engine="$GITHUB_WORKSPACE/out/extended/walrus" ${{ matrix.switch }} wasm-test-extended
364364
365+
build-test-no-gc-linux:
366+
runs-on: ubuntu-latest
367+
strategy:
368+
fail-fast: false
369+
matrix:
370+
mode: [debug]
371+
arch: [x64]
372+
switch: [--jit, ""]
373+
steps:
374+
- uses: actions/checkout@v4
375+
with:
376+
submodules: true
377+
- name: Install Packages
378+
run: |
379+
sudo apt update
380+
sudo apt install -y ninja-build gcc-multilib g++-multilib
381+
- name: Build ${{ matrix.arch}}
382+
env:
383+
BUILD_OPTIONS: -DWALRUS_ARCH=${{ matrix.arch }} -DWALRUS_HOST=linux -DWALRUS_MODE=${{ matrix.mode }} -DWALRUS_OUTPUT=shell -DWALRUS_GC=OFF -GNinja
384+
run: |
385+
cmake -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -H. -Bout/nogc $BUILD_OPTIONS
386+
ninja -Cout/nogc
387+
- name: "Remove GC tests"
388+
run: |
389+
rm -rf ./test/web-assembly3/gc
390+
- name: Run Tests
391+
run: |
392+
$RUNNER --engine="$GITHUB_WORKSPACE/out/nogc/walrus" ${{ matrix.switch }}
393+
394+
build-test-no-gc-on-macos-arm64:
395+
strategy:
396+
fail-fast: false
397+
matrix:
398+
mode: [debug]
399+
switch: [--jit, ""]
400+
runs-on: macos-latest
401+
steps:
402+
- uses: actions/checkout@v4
403+
with:
404+
submodules: true
405+
- name: Install Packages
406+
run: |
407+
brew update
408+
brew install ninja
409+
- name: Build arm64
410+
env:
411+
BUILD_OPTIONS: -DWALRUS_MODE=${{ matrix.mode }} -DWALRUS_OUTPUT=shell -DWALRUS_GC=OFF -GNinja
412+
run: |
413+
cmake -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -H. -Bout/mac $BUILD_OPTIONS
414+
ninja -Cout/mac
415+
- name: "Remove 2 test files due to stack overflow occurred by recursion calls in debug mode build by clang"
416+
if: matrix.mode == 'debug'
417+
run: |
418+
rm ./test/wasm-spec/core/call.wast
419+
rm ./test/wasm-spec/core/call_indirect.wast
420+
- name: "Remove GC tests"
421+
run: |
422+
rm -rf ./test/extended/gc
423+
- name: Run Tests
424+
run: |
425+
#FIXME try-catch is unstable in macos build
426+
$RUNNER --engine="$GITHUB_WORKSPACE/out/mac/walrus" ${{ matrix.switch }}
427+
428+
365429
build-test-performance-x64_x86:
366430
strategy:
367431
fail-fast: false

build/target.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ ELSEIF (${WALRUS_HOST} STREQUAL "darwin")
187187
SET (WALRUS_THIRDPARTY_CFLAGS ${WALRUS_THIRDPARTY_CFLAGS} -UHAVE_PTHREAD_GETATTR_NP -UUSE_GET_STACKBASE_FOR_MAIN)
188188
SET (WALRUS_BUILD_64BIT ON)
189189
SET (WALRUS_BUILD_64BIT_LARGE ON)
190+
add_compile_definitions(WALRUS_APPLE)
190191
ELSEIF (${WALRUS_HOST} STREQUAL "windows")
191192
# in windows, default stack limit is 1MB
192193
# but expand stack to 8MB when building to exe for running test
@@ -212,6 +213,7 @@ ELSEIF (${WALRUS_HOST} STREQUAL "windows")
212213
ELSE()
213214
MESSAGE (FATAL_ERROR ${WALRUS_ARCH} " is unsupported")
214215
ENDIF()
216+
215217
ELSE()
216218
MESSAGE (FATAL_ERROR ${WALRUS_HOST} " with " ${WALRUS_ARCH} " is unsupported")
217219
ENDIF()

src/jit/SimdArm64Inl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ static void simdEmitNarrowUnsigned(sljit_compiler* compiler, sljit_s32 rd, sljit
605605
static void simdEmitDot(sljit_compiler* compiler, uint32_t type, sljit_s32 rd, sljit_s32 rn, sljit_s32 rm)
606606
{
607607
// The rd can be tmpReg1
608-
#ifdef __ARM_FEATURE_DOTPROD
608+
#if defined(__ARM_FEATURE_DOTPROD) && !defined(WALRUS_APPLE)
609609
simdEmitOp(compiler, SimdOp::sdot | type, rd, rn, rm);
610610
#else
611611
sljit_s32 tmpReg1 = SLJIT_TMP_FR0;

0 commit comments

Comments
 (0)