电脑配置:macos catalina i5 16g 1t
编译版本:v8-version,8.6.00.1
编译日期:2020.07.15
1.git装置配置
先装置homebrew
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
而后
brew install git
git的配置参考
https://docs.github.com/en/gi... 操作即可
2.depot_tools下载安装
depot\_tools是个工具包,外面蕴含gclient、gcl、gn和ninja等工具。其中gclient是代码获取工具,它其实是利用了svn和git。gn和nijia是编译工具
在下载depot\_tools时须要迷信上网这样能力关上
https://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html#_setting_up
同时还须要查看本人的迷信上网软件的代理端口而后
git config --global http.proxy "127.0.0.1:1087”
这样能力下载回来
git clone https://chromium.googlesource.com/chromium/tools/depot\_tools.git
下回来之后须要设置全局变量
https://blog.csdn.net/akaier/article/details/81296794
设置好了当前须要输出gclient更新depot\_tools但会报错
curl: (7) Failed to connect to chrome-infra-packages.appspot.com port 443: Operation timed out
又是代理的问题所以间接这样设置
https://www.jianshu.com/p/db3964292b1c
而后再来
gclient
更新会呈现
WARNING: Your metrics.cfg file was invalid or nonexistent. A new one will be created.
这时候就ok了
3.编译源码
mkdir ~/v8cd ~/v8fetch v8
拉取对应的文件,继续期待
这个时候能够去下载xcode软件
等拉取完了能够在本地创立一个新分支
git new-branch 20200715gykgit pull && gclient sync//确保所有依赖都是最新的
开始编译源码
tools/dev/gm.py x64.release.check
autoninja会主动编译记得开代理,漫长的期待
\# autoninja -C out/x64.release unittests cctest inspector-test d8 wasm\_api\_testsninja: Entering directory \`out/x64.release'\[520/520\] LINK ./cctest\# "/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python" tools/run-tests.py --outdir=out/x64.release debugger intl mjsunit cctest message unittests Build found: /Users/gyk/v8/v8/out/x64.release\>>> Autodetected:pointer\_compression\>>> Running tests for x64.release\>>> Running with test processors\[02:24|% 97|+ 16494|- 0\]: Done \>>> 16972 base tests produced 16494 (97%) non-filtered tests\>>> 16494 tests ranDone! - V8 compilation finished successfully.