V8 JavaScript Engine on Windows (MinGW)

The build instructions of V8 JavaScript Engine mention only Visual Studio 2005 and 2008. Has anybody been successful with MinGW on Windows XP/Vista?

Answers


You just need to change Scons a bit. Take a look at C:\YourPythonFolder\Lib\site-packages\scons-YourSconsVersion\SCons\Script__ init__.py and go to line 560. Change the linker to gnulink, the c compiler to mingw and the c++ compiler to g++. Eventually it should look like this:

linkers = ['gnulink', 'mslink',  'ilink', 'linkloc', 'ilink32' ]
c_compilers = ['mingw', 'msvc',  'gcc', 'intelc', 'icl', 'icc', 'cc', 'bcc32' ]
cxx_compilers = ['g++', 'msvc', 'intelc', 'icc',  'c++', 'bcc32' ]

Now MingW is activated by default :)


There is a patch for MinGW support: http://codereview.chromium.org/18309

See also: http://code.google.com/p/v8/issues/detail?id=64


I've tried, but seems it automatically detect the WIN32 platform and tries to invoke the vc++ compiler, I tried to adding to the PATH the mingw-gcc compiler (I've not vc++ installed) and the build script correctly sees it, but doesn't compile out of the box.

I suppose deleting the "WIN32 flag" will do the work, since for successfully compiling under mingw the compiler needs to thinks to be on unix enviroment, but then even if it compiles probably it will have some problems due to the different platform.


V8 seems to use different parts of its code (especialy for the file system stuff) for different platforms. I made a build under Cygwin which puts out a beautiful linux lib, which runs on linux but doesn't on Win. I think partwise this will be the same with MinGW if you erase the WIN32 flag!

At the moment I just can see 2 possibilities. One is simple: Use Visual Studio, it's free. The second is very hard: write a makefile :)


Need Your Help

Pivot table like mysql structure

php mysql

Need some help with a mySQL statement.

How to Count Page views by unique IP

php pageviews

I have a video playing page where I want to count video views. Currently I am updating page views with: