Hi everyone,
We are trying to upgrade our Spidermonkey embedding (from a very old version 1.8.5) to the latest version.
I have tried and failed to do this in the past as I just didn't have enough time with other work commitments. The last time I tried was a year or so ago, trying to upgrade to Spidermonkey 59 and I cracked a lot of the problems.
Our team has now grown and I now have some help to try this again. In fact one of my colleagues has already posted a question here trying to find out information on what has changed between Spidermonkey 59 and 76...
So I've downloaded spidermonkey 76 and successfully managed to build it and run the tests on Linux. Great start :-)
However I'm completely at a loss as to how to build Spidermonkey on windows and I'm hoping someone can point me in the right direction...
I downloaded mozillabuild from
https://ftp.mozilla.org/pub/mozilla/libraries/win32/MozillaBuildSetup-Latest.exe and installed it. I have Visual Studio 2017 installed as well.
In mozillabuild I then run the 'start-shell.bat' file to start the mingw32 environment and go to the directory where I have extracted the spidermonkey source.
I then do the following to try to build a debug build
cd js/src
mkdir obj
cd obj
../configure --prefix=xxxx --enable-debug --disable-optimize
This fails very quickly with
checking for vcs source checkout... no
checking for a shell... C:/mozilla-build-3.3/msys/bin/sh.exe
checking for host system type... x86_64-pc-mingw32
checking for target system type... x86_64-pc-mingw32
checking whether cross compiling... no
checking for yasm... c:/mozilla-build-3.3/bin/yasm.exe
checking yasm version... 1.3.0
checking for the target C compiler... not found
DEBUG: _cc: Trying clang-cl
DEBUG: _cc: Trying gcc
DEBUG: _cc: Trying clang
ERROR: Cannot find the target C compiler
I tried adding '--target=x86_64-pc-mingw32 --host=x86_64-pc-mingw32' to configure but that didn't help.
How do I get the build environment to find/recognise VS2017?
Years ago mozillabuild used to have batch files like 'start-shell-msvc2013-x64.bat'. The latest mozillabuild just has 'start-shell.bat' so I don't understand how it finds the Visual Studio 2017 compilers (and it clearly doesn't!)
I'm sure I'm being really stupid here and missing something obvious but can anybody help?
Assuming that I can sort this out, presumably I also need to install Rust to compile Spidermonkey. For Linux I installed the standalone Rust 1.43.0 installer for platform 'x86_64-unknown-linux-gnu' from
https://forge.rust-lang.org/infra/other-installation-methods.html and it all seemed to work.
Presumably for windows I need platform 'x86_64-pc-windows-msvc'
If anybody can help with this I would be very grateful.
Many thanks in advance.
Miles