Skip to content

MAC M1 安装 V8 环境

获取V8源代码

访问V8官网,通过官网公布的V8 源代码仓库将v8引擎clone到本地。

shell
git clone https://chromium.googlesource.com/v8/v8.git

如何上面的链接访问不了,那么在github上clone也是可以的。

shell
git clone https://github.com/v8/v8.git

安装 depot_tools

将depot_tools下载到本地

shell
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git

再在本地的 ~/.bash_profile 或者 ~/.bashrc 或者 ~/.zshrc 文件配置一下 环境变量;

## /path/to/depot_tools 是你clone的depot_tools的路径
export PATH=/path/to/depot_tools:$PATH

测试 depot_tools 是否安装成功