git config --global https.proxy https://127.0.0.1:10810
git config --global http.proxy http://127.0.0.1:10810
netsh winhttp set proxy 127.0.0.1:10810
set http_proxy=http://127.0.0.1:10810
set https_proxy=https://127.0.0.1:10810
git config --global --unset http.proxy
git config --global --unset https.proxy
netsh winhttp reset proxy
set HTTP_PROXY=
set HTTPS_PROXY=
编译V8前将代理设置好,通过看程序端口可进行配置,没有就不要想编译v8了。
下载deptools
git clone https://chromium.googlesource.com/chromium/tools/depot_tools
set DEPOT_TOOLS_WIN_TOOLCHAIN = 0
set GYP_MSVS_OVERRIDE_PATH =
set GYP_MSVS_VERSION = 2017
set WINDOWSSDKDIR=D:\Windows Kits\10
备注:安装的sdk需要Debugging Tools for Windows,按理来说,Windows SDK是跟VS一起安装的,并没有给我配置的机会。那这个问题怎么解决呢?还是有办法的。打开“卸载或更改程序”,在里面找到“Windows Software Development Kit”,然后点击“修改”,然后选择“Change”,在里面把“Debugging Tools for Windows”打上勾,然后点击“change”,就好了
然后就是将deptools的路径加入path中。
fetch v8
cd v8
git checkout 8.8-lkgr
gclient sync -v
如果要更新工具,可以关闭 set DEPOT_TOOLS_UPDATE=0
记住你的代理 可能更改端口一定要 出问题后查看端口是否改变。
python tools/dev/v8gen.py x64.debug -vv 查看具体错误。
- 如下问题:python 版本不对,
- winsdk版本不对,别挣扎换正确版本,他指出了。
- 别挣扎,需要改文件
/third_party/googletest/BUILD.gn, visibility = [ " : *" ] 改为visibility = [ "*" ]解决。
- 更新未到位,执行
python build\util\lastchange.py build\util\LASTCHANGE
解决
注意如果在期间出现任何问题 请先看下报错路径是否有文件,也许是下载文件不成功导致。如下:
根本没有这个文件。 重新下载…
1,singleByteCharCount这个报错 未使用
解决:在build/config/compiler/compiler.gni 中将treat_warnings_as_errors=true 修改为 false。
2,报错error: integer value 7 is outside the valid range of values 这个。
解决:在build/config/compiler/BUILD.gn 中加入 -Wno-enum-constexpr-conversion即可解决。
```
if (is_clang && is_debug) {
# Allow comparing the address of references and 'this' against 0
# in debug builds. Technically, these can never be null in
# well-defined C/C++ and Clang can optimize such checks away in
# release builds, but they may be used in asserts in debug builds.
cflags_cc += [
"-Wno-undefined-bool-conversion",
"-Wno-enum-constexpr-conversion",
"-Wno-tautological-undefined-compare",
]
}
1,singleByteCharCount这个报错 未使用
解决:在build/config/compiler/compiler.gni 中将treat_warnings_as_errors=true 修改为 false。
2,报错error: integer value 7 is outside the valid range of values 这个。
解决:在build/config/compiler/BUILD.gn 中加入 -Wno-enum-constexpr-conversion即可解决。
```
if (is_clang && is_debug) {
# Allow comparing the address of references and 'this' against 0
# in debug builds. Technically, these can never be null in
# well-defined C/C++ and Clang can optimize such checks away in
# release builds, but they may be used in asserts in debug builds.
cflags_cc += [
"-Wno-undefined-bool-conversion",
"-Wno-enum-constexpr-conversion",
"-Wno-tautological-undefined-compare",
]
}
参考:
https://blog.csdn.net/u011760195/article/details/109941227
https://blog.csdn.net/HermitSun/article/details/106091018
https://blog.csdn.net/liliangnike/article/details/109775254 写了很多错误解决办法
https://www.jianshu.com/p/8f35e19e6b03