Skip to content

Commit

Permalink
Merge pull request #17 from cfallin/cfallin/build-gecko-weval
Browse files Browse the repository at this point in the history
Add builds for PBL+weval variant of SpiderMonkey.
  • Loading branch information
cfallin authored Jul 26, 2024
2 parents ef44716 + cfe1f46 commit a7d193c
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 4 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
19 changes: 16 additions & 3 deletions build-engine.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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.
Expand Down
7 changes: 6 additions & 1 deletion download-engine.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit a7d193c

Please sign in to comment.