Error when try to compile Chromium

三世轮回 提交于 2019-12-05 00:40:38

The out directory and its contents (including build.ninja) are created by running

python build\gyp_chromium

or

gclient runhooks

Executing either command from within /src should allow your compile to proceed.

After the switch to "gn" you could try:

gn gen out/Debug

On Windows machine!

When I was running gn gen out/Default it also gave me an error:

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

I did the following steps and it worked for me.

  1. Set this variable. Reference (not sure about its purpose yet)

set DEPOT_TOOLS_WIN_TOOLCHAIN=0

  1. Run the command gn gen out/Default

  2. Run the build command again

autoninja -C out/Default chrome

It is also recommended to run gclient sync from out/Default directory.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!