Build SpiderMonkey on Windows

SpiderMonkey is Mozilla's JavaScript engine written in C/C++. It is used in various Mozilla products, including Firefox, and is available under MPL/GPL/LGPL tri-license.

     Visual Studio 2008

  1. Download SpiderMonkey v1.8.5 after and unzip it
  2. Download and install MozillaBuild.exe
  3. Download NSPR and unzip
  4. Open Visual Studio 2008 Command Line 
  5. Enter MozillaBuild folder, type start-msvc9.bat
  6. Compile NSPR
    cd c:/nspr-4.8.9
    mkdir Debug
    cd Debug
    ../mozilla/nsprpub/configure --enable-win32-target=WIN95    (  WIN95 means Win32 not Windows 95)
  7. Compile SpiderMonkey
    cd /c/js-1.8.5/js/src
    mkdir Release
    cd Release
    ../configure --enable-win32-target=WIN95         (*)

    cd ..
    mkdir Debug
    cd Debug
    ../configure --enable-win32-target=WIN95 --enable-debug --disable-optimize    (*)
  8. Test js
    At Release or Debug folder, type
    ./js ../Y.js
    5! is 120

(*)1.8.5 default OS version is Win7. If you use WinXP, you should set the version to  --with-windows-version=600

1.8.7 just support later than Win7 version...


Popular posts from this blog


After reading Steve Jobs Autobiography

Drawing textured cube with Vulkan on Android