我尝试使用该命令ninja -C out/Debug chrome
来编译 Chromium。
但是错误消息说:
ninja error loading 'build.ninja': the system cannot find the file specified
ninja Entering dictory 'out/Debug'
我能知道是什么问题吗?
谢谢。
out 目录及其内容(包括 build.ninja)是通过运行创建的
python build\gyp_chromium
或者
gclient 运行钩子
从 /src 中执行任一命令应该允许您的编译继续进行。
在 Windows 机器上!
当我运行gn gen out/Default
它时,它也给了我一个错误:
ERROR at //build/config/win/visual_studio_version.gni:27:7: Script returned non-zero exit code.
exec_script("../../vs_toolchain.py", [ "get_toolchain_dir" ], "scope")
^----------
Current dir: D:/Chromium/src/out/Goma/
Command: C:/Python27/python.exe -- D:/Chromium/src/build/vs_toolchain.py get_toolchain_dir
Returned 1 and printed out:
Please follow the instructions at https://chromium.googlesource.com/chromium/src/+/master/docs/windows_build_instructions.md
我做了以下步骤,它对我有用。
set DEPOT_TOOLS_WIN_TOOLCHAIN=0
运行命令gn gen out/Default
再次运行构建命令
autoninja -C out/Default chrome
还建议gclient sync
从out/Default
目录运行。
切换到“gn”后,您可以尝试:
gn 输出/调试