Building Mozilla SpiderMonkey
Official Mozilla instructions are available here: https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Build_Documentation
Preparation steps:
- Download Mozilla SpiderMonkey sources via git or mercurial. You need esr68branch.
- Download and install MozillaBuild.
- Download and install LLVM.
Build steps:
- Open command prompt.
- Execute the following commands:
# Switch to your `MozillaBuild` installation folder.
cd ${YOUR_MOZILLA_BUILD_PATH}
./start-shell.bat
# Switch to your SpiderMonkey sources folder.
cd ${YOUR_SPIDERMONKEY_SRC_PATH}
cd js/src
mkdir _build
cd _build
# Adjust LLVM installation path if needed.
# Add `--enable-debug` if you want to make a binary for debug build of SMP.
PATH=$PATH:"/c/Program Files/LLVM/bin/" JS_STANDALONE=1 ../configure --enable-nspr-build --disable-jemalloc --disable-js-shell --disable-tests --target=i686-pc-mingw32 --host=i686-pc-mingw32 --with-libclang-path="C:/Program Files/LLVM/bin" --with-clang-path="C:/Program Files/LLVM/bin/clang.exe"
mozmake
Build artifacts will be located in the following paths:
- _build/dist:- .dlland headers.
- _build/js/src/build:- mozjs-68.liband- mozjs-68.pdb.
- _build/config/external/nspr/ds:- plds4.pdb.
- _build/config/external/nspr/libc:- plc4.pdb.
- _build/config/external/nspr/pr:- nspr4.pdb.