Skip to content
Open
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
77 changes: 0 additions & 77 deletions workloads/j2cl-box2d-wasm/add-fixed-run-count-api.patch

This file was deleted.

5 changes: 2 additions & 3 deletions workloads/j2cl-box2d-wasm/build.log
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Built on 2025-08-20 17:36:29+02:00
Cloning into 'j2cl'...
fbbe1e6db2 [J2KT] Remove dangling readable files which were added by accident.
Built on 2026-10-28T22:42:00Z
6a6e6d7d5d Model java.lang.Enum super calls with the canonical implicit super call target.
Copying generated files into build/
Build success
12 changes: 4 additions & 8 deletions workloads/j2cl-box2d-wasm/build.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
#!/bin/bash
J2CL_REV=fbbe1e6db2928179f5e747ae382266beb3d2db38
J2CL_REV=6a6e6d7d5d1278f0bcca60794882e0f0211e44d1
set -eo pipefail

# Cleanup old files.
rm -rf build/
rm -rf j2cl/

BUILD_LOG="$(realpath build.log)"
echo -e "Built on $(date --rfc-3339=seconds)" | tee "$BUILD_LOG"
echo -e "Built on $(date -u '+%Y-%m-%dT%H:%M:%SZ')" | tee "$BUILD_LOG"

# Build the benchmark from source.
git clone https://github.com/google/j2cl.git |& tee -a "$BUILD_LOG"
git clone -q https://github.com/google/j2cl.git 2>&1 | tee -a "$BUILD_LOG"
pushd j2cl/
git checkout $J2CL_REV
git checkout -q $J2CL_REV
git log -1 --oneline | tee -a "$BUILD_LOG"
git apply ../add-fixed-run-count-api.patch | tee -a "$BUILD_LOG"
BUILD_SRC_DIR="benchmarking/java/com/google/j2cl/benchmarks/octane/"
pushd "$BUILD_SRC_DIR"
bazel build //benchmarking/java/com/google/j2cl/benchmarks/octane:Box2dBenchmark_local-j2wasm-v8
Expand All @@ -25,9 +24,6 @@ echo "Copying generated files into build/" | tee -a "$BUILD_LOG"
mkdir -p build/ | tee -a "$BUILD_LOG"
BUILD_OUT_DIR="j2cl/bazel-bin/$BUILD_SRC_DIR"
cp $BUILD_OUT_DIR/Box2dBenchmark_j2wasm_entry.js build/ | tee -a "$BUILD_LOG"
# FIXME: Remove this workaround, once Safari/JSC implements JS-string builtins.
# Since these imports/builtins are never called in the workload, they should not have any effect on runtime.
sed -i 's/imports:/"wasm:js-string":{fromCharCodeArray:unused_import,concat:unused_import,equals:unused_import,compare:unused_import,length:unused_import,charCodeAt:unused_import,substring:unused_import},imports:/g' build/Box2dBenchmark_j2wasm_entry.js
cp $BUILD_OUT_DIR/Box2dBenchmark_j2wasm_binary.wasm build/ | tee -a "$BUILD_LOG"
cp $BUILD_OUT_DIR/Box2dBenchmark_j2wasm_binary.binaryen.symbolmap build/ | tee -a "$BUILD_LOG"
echo "Build success" | tee -a "$BUILD_LOG"
Loading
Loading