Experimental project to evaluate regressions in SM againt sightglass tests and compare itself with Cranelift.
The project is using SpiderMonkey embedding. See https://github.com/mozilla-spidermonkey/spidermonkey-embedding-examples/blob/esr91/docs/Building%20SpiderMonkey.md on how to build the library
Rough steps to build mozjs library:
- Clone Firefox source code, e.g.
git clone --depth 1 -b beta https://github.com/mozilla/gecko-dev
- Install all prereqs required to build FF, and recommended to run
./mach boostrap
in the cloned folder to configure for desktop builds - Make a build folder and configure to build the engine, e.g.:
mkdir _build && cd _build
# for macos, edit ../gecko-dev/build/moz.configure/pkg.configure line 19 to remove `"OSX", `
# see https://bugzilla.mozilla.org/show_bug.cgi?id=1776255
sh ../gecko-dev/js/src/configure \
--disable-jemalloc --with-system-zlib --with-intl-api \
--enable-release --enable-optimize --prefix=$PWD/../mozjs
make -j 8
make install
Back to main library build: just make a copy of Makefile and adjust the variables, then make
.
You may need export LD_LIBRARY_PATH=/path/to/mozjs/lib
before running with the sightglass.
The documentation on running sightglass can be found at https://github.com/bytecodealliance/sightglass#running-the-full-benchmark-suite