官方地址:Checking out and building Chromium for iOS
记录遇到的问题:
- 在
Setting up the build
第一步执行setup-gn.py
脚本
在chromium/src
路径下执行命令:
vpython ios/build/tools/setup-gn.py
遇到错误:
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
解决方案:
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
-
xcode
的command+r
运行阶段:
ERROR at //build/config/ios/ios_sdk.gni:100:21: Script returned non-zero exit code.
删除chromium/src/out
文件夹,重新执行vpython ios/build/tools/setup-gn.py
,完成之后用
命令autoninja -C out/Debug-iphonesimulator gn_all
build一下项目看看没问题再用xcode(理论上直接用xcode就可以,迷信做法)