diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c3c4de9..170c27c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -31,11 +31,22 @@ jobs: run: | mkdir dist sudo apt-get update -y + bash ./build-engine.sh release tar -a -cf dist/spidermonkey-wasm-static-lib_release.tar.gz release rm -rf release obj-release + + bash ./build-engine.sh release weval + tar -a -cf dist/spidermonkey-wasm-static-lib_release_weval.tar.gz release-weval + rm -rf release-weval obj-release-weval + bash ./build-engine.sh debug tar -a -cf dist/spidermonkey-wasm-static-lib_debug.tar.gz debug + rm -rf debug obj-debug + + bash ./build-engine.sh debug weval + tar -a -cf dist/spidermonkey-wasm-static-lib_debug_weval.tar.gz debug-weval + rm -rf debug-weval obj-debug-weval - name: Calculate tag name run: | diff --git a/build-engine.sh b/build-engine.sh index 7541a81..1ab0083 100755 --- a/build-engine.sh +++ b/build-engine.sh @@ -7,9 +7,13 @@ working_dir="$(pwd)" script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" mode="${1:-release}" -mozconfig="${working_dir}/mozconfig-${mode}" -objdir="obj-$mode" -outdir="$mode" +weval="" +if [[ $# > 1 ]] && [[ "$2" == "weval" ]]; then + weval=-weval +fi +mozconfig="${working_dir}/mozconfig-${mode}${weval}" +objdir="obj-$mode${weval}" +outdir="$mode${weval}" rebuild="${REBUILD_ENGINE:-0}" cat << EOF > "$mozconfig" @@ -63,6 +67,15 @@ case "$mode" in ;; esac +case "$weval" in + -weval) + echo "ac_add_options --enable-portable-baseline-interp-force" >> "$mozconfig" + echo "ac_add_options --enable-aot-ics" >> "$mozconfig" + echo "ac_add_options --enable-aot-ics-force" >> "$mozconfig" + echo "ac_add_options --enable-pbl-weval" >> "$mozconfig" + ;; +esac + # For a full build (not a rebuild), we need to clone the repo and do some setup work. # `rebuild.sh` invokes this script with REBUILD_ENGINE=1 which sets rebuild=1 # and skips this setup. diff --git a/download-engine.sh b/download-engine.sh index 7286137..0342827 100755 --- a/download-engine.sh +++ b/download-engine.sh @@ -12,9 +12,14 @@ if [[ $1 == "debug" ]] then mode="debug" fi +weval="" +if [[ $2 == "weval" ]] +then + weval="_weval" +fi git_rev="$(git -C "$script_dir" rev-parse HEAD)" -file="spidermonkey-wasm-static-lib_${mode}.tar.gz" +file="spidermonkey-wasm-static-lib_${mode}${weval}.tar.gz" bundle_url="${gh_url}/releases/download/rev_${git_rev}/${file}" curl --fail -L -O "$bundle_url"