编译v8-JS引擎
准备
官方文档 https://v8.dev/docs
参考这里的分支命名方式
https://v8.dev/docs/release-process
然后通过这里
https://omahaproxy.appspot.com/
可以查到最新稳定版本的大版本号
通过大版本号可以直接分支checkout出稳定的代码分支
https://chromium.googlesource.com/v8/v8.git/+/branch-heads/8.5、
在这里可以查到大版本号的最新记录
Android 平台
我的配置
1 | is_component_build = false |
修复ndk命名空间导致的问题,可能是唯一正解https://stackoverflow.com/questions/56339224/error-while-building-v8-in-android-embedded
参考
- https://github.com/cmdr2/v8-android
- https://github.com/Kudo/v8-android-buildscripts
- https://cstsinghua.github.io/2018/04/04/%E6%9E%84%E5%BB%BAv8%20engine%E6%8C%87%E5%8D%97/
Windows配置
预先设置环境变量来跳过工具链下载 DEPOT_TOOLS_WIN_TOOLCHAIN=0
1 | is_component_build=true |
附录
测试引擎对JS标准的支持情况(在使用一些JS引擎的老版本时)
https://github.com/tc39/test262
https://test262.fyi/# 显示一些主流引擎的兼容性