Compiling NSPR and SpiderMonkey

Notes:

<DEBUG-PREFIX> and <RELEASE-PREFIX> are directories you specify where the NSPR output will go. You must keep them consistent between NSPR and SpiderMonkey.

 

NSPR:

Download the source code from here (we use v4.8) and follow the standard build instructions (ignore the cvs checkout instructions) using these options:

Debug:

./configure --with-dist-prefix="<DEBUG-PREFIX>" --enable-debug-rtl --enable-cplus

Release:

./configure --with-dist-prefix="<RELEASE-PREFIX>" --disable-debug --enable-optimize --enable-cplus

 

SpiderMonkey-1.8:

First, compile NSPR appropriately, then apply file:fix-makefile.diff patch to the source code you download from here, then follow the standard build instructions, using these options:

Debug:

make JS_DIST="<DEBUG-PREFIX>" JS_THREADSAFE=1 -f Makefile.ref js32.dll

Release:

make JS_DIST="<RELEASE-PREFIX>" JS_THREADSAFE=1 BUILD_OPT=1 -f Makefile.ref js32.dll