说明:v8 third_party 和depot_tools svn root目录:
https://src.chromium.org/svn/trunk/tools/
如果在编译过程中有什么问题,也可以给我消息,我会尽快回复,如发现错误,也请指正。欢迎共同学习!QQ312919010
注意:生成VS工程时,需要使用python2.7。但编译时,third_party下一定要使用python2.6。否则会编译不通过。
-
VS2015编译v8
-
安装 python 并将python二进制目录添加到系统环境变量中
-
设置环境变量:
-
DEPOT_TOOLS_WIN_TOOLCHAIN=0.
-
GYP_MSVS_VERSION=2013或2015
-
depot_tools 路径添加到Path
-
python 2.7的目录添加到Path
-
-
准备工作:
third_party 和 depot_tools的内容务必完全的。否则编译可能会出问题。
third_party:
depot_tools:
-
替换build/standalone.gypi 文件中的,‘WarnAsError'的值 'true' -> 'false',true的意思是将编译过程中的警告视为错误。
-
执行:在源代码目录下,执行
-
python build\gyp_v8 -Dtarget_arch=x64
5. 选项:
-Dcomponent=shared_library
(see library=shared
in the GCC + make section above)
-Dconsole=readline
(see console=readline
)
-Dv8_enable_disassembler=1
(see disassembler=on
)
-Dv8_use_snapshot='false'
(see snapshot=off
)
-Dv8_enable_gdbjit=1
(see gdbjit=on
)
-Dv8_use_liveobjectlist=true
(see liveobjectlist=on
)
编译错误:
1. error C2220: warning treated as error - no 'object' file generated
设置:C/C++ -> General -> Treat Warnings As Errors 为 No (/WX-)
文件下载链接分享:
1. third_party http://pan.baidu.com/s/1gfec7BH
2.depot_tools http://pan.baidu.com/s/1bLpQnO