Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,19 @@ jobs:
with:
name: x86-64-linux-o3
path: bin/*.x86-64-linux
x86_64-darwin:
runs-on: macos-15-intel # native x86-64 runner
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build and Test
run: bash ./ci/build-test.sh x86-64-darwin
- name: Upload Built Binaries
if: always()
uses: actions/upload-artifact@v4
with:
name: x86-64-darwin
path: bin/*.x86-64-darwin
jvm:
runs-on: ubuntu-latest
steps:
Expand Down
14 changes: 13 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
all: x86-linux x86-64-linux jvm

.PHONY: clean x86-linux x86-64-linux jvm wasm-wave
.PHONY: clean x86-linux x86-64-linux x86-64-darwin jvm wasm-wave
clean:
rm -f TAGS bin/*
cp scripts/* bin/
Expand All @@ -11,6 +11,8 @@ arm64-linux: bin/wizeng.arm64-linux bin/unittest.arm64-linux

x86-64-linux: bin/wizeng.x86-64-linux bin/unittest.x86-64-linux

x86-64-darwin: bin/wizeng.x86-64-darwin bin/unittest.x86-64-darwin

jvm: bin/wizeng.jvm bin/unittest.jvm

wasm-wave: bin/wizeng.wasm bin/unittest.wasm
Expand Down Expand Up @@ -90,6 +92,16 @@ bin/wizeng.x86-64-linux: $(WIZENG) $(MONITORS) $(WASI_X86_64_LINUX) $(WALI_X86_6
bin/objdump.x86-64-linux: $(OBJDUMP) $(X86_64) build.sh
./build.sh objdump x86-64-linux

# x86-64-darwin targets
bin/unittest.x86-64-darwin: $(UNITTEST) build.sh
./build.sh unittest x86-64-darwin

bin/wizeng.x86-64-darwin: $(WIZENG) $(MONITORS) build.sh
./build.sh ${WIZENG_BUILD_SH_ARGS} wizeng x86-64-darwin

bin/objdump.x86-64-darwin: $(OBJDUMP) build.sh
./build.sh objdump x86-64-darwin

# interpreter targets
bin/unittest.v3i: $(UNITTEST) build.sh
./build.sh unittest v3i
Expand Down
8 changes: 6 additions & 2 deletions ci/build-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,12 @@ export WIZENG_OPTS="$WIZENG_OPTS $WIZENG_RUNTIME_ARGS"
make -j $TEST_TARGET

# Install Opam for specification tests
sudo apt-get update
sudo apt-get install -y opam
if [ "$(uname -s)" = "Darwin" ]; then
brew install opam
else
sudo apt-get update
sudo apt-get install -y opam
fi
opam init

# Install spec test dependencies
Expand Down
24 changes: 23 additions & 1 deletion scripts/sense_host.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,36 @@ PLATFORM=$(uname -sm)

HOSTS=""

if [[ "$PLATFORM" = "Darwin i386" || "$PLATFORM" = "Darwin x86_64" ]]; then
# Rosetta 2 allows arm64 Darwin machines to run x86-64 Darwin binaries.
# Set USE_ROSETTA2=1 to assume it is available, USE_ROSETTA2=0 to ignore it;
# otherwise sense it by looking for the runtime that its installer puts down.
ROSETTA2_RUNTIME=/Library/Apple/usr/libexec/oah/libRosettaRuntime

function has_rosetta2() {
if [ -n "$USE_ROSETTA2" ]; then
[ "$USE_ROSETTA2" = 1 ]
return
fi
[ -f "$ROSETTA2_RUNTIME" ]
}

if [[ "$PLATFORM" = "Darwin i386" ]]; then
H="x86-darwin"
HOSTS="$H $HOSTS"
fi

if [[ "$PLATFORM" = "Darwin x86_64" ]]; then
H="x86-64-darwin"
HOSTS="$H $HOSTS"
fi

if [[ "$PLATFORM" = "Darwin arm64" ]]; then
H="arm64-darwin"
#TODO: unsupported target HOSTS="$H $HOSTS"
if has_rosetta2; then
H="x86-64-darwin"
HOSTS="$H $HOSTS"
fi
fi

if [[ "$PLATFORM" = "Linux i386" || "$PLATFORM" = "Linux i686" ]]; then
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
last_store_noinline.wasm
gc_struct_new_inlined_probe.wasm
2 changes: 2 additions & 0 deletions test/regress.failures.x86-64-darwin
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
test/regress/core/mem4g.bin.wast
test/regress/ext:memory64/mem4g.bin.wast
6 changes: 6 additions & 0 deletions test/wasi/failures.x86-64-darwin
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// platform specific wasi apis are not implemented in x86-64-darwin yet
clock_time_get0.wasm
wasi_flag_dir01.wasm
wasi_prestat_get01.wasm
wasi_prestat_dir_name01.wasm
wasi_path_open00.wasm
Loading