Before I compiled v8 with visual studio 2015 successfully,
I had tried the method from Chandra's Blog,
and v8 with eclipse.
But, I can not build v8 by followed these poses.
Why I don't use make command with gdb debugger in Linux?
Because visual studio is easier to trace functions called and variables value.
Tools Preparation
Install Visual Studio 2015 (while I am writing this post, visual studio 2017 has already released)
Install Visual C++ Redistributable (serial versions may be required to install)
Install git/github (make sure you can run git from command prompt/powershell)
Install python 2.7+ (don't use 3.x)
Instructions Before Build
Clone depot tools by running command git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
Add the depot tools to environment path (so that you can run gclient in command prompt/powershell)
Open command prompt and run fetch v8, then it will download v8 source code.
Why not just use the source code from github? Because some files are missing.
Now you should see a v8 folder.
Go into v8/gypfiles.
Currently, you should see file gyp_v8
(If not, you are in wrong direcotry) fig 1. gyp_v8 file
Use any text editor to open file vs_toolchain.py
and edit variable CURRENT_DEFAULT_TOOLCHAIN_VERSION to 2015
(let the python know you have visual studio 2015) fig 2. edit toolchain
Run set GYP_GENERATORS=msvs (If not, you won't get file all.sln on next step)
Run python gyp_v8 -Dtarget_arch=x64 (I am using 64 bit windows, you may change x64 to ia32 if on 32 bit windows)
If no error, you will see all.sln fig 3. all.sln file
Open all.sln with visual studio 2015.
When you build the code, you may get a bunch of error.
Right click on the project you want to build,
Under C/C++ -> General, change the warning level to /W3
(I change to /W0 and set NO(/WX-) for Treat Warnings As Errors) fig 4. disable warning message