mac os 下载编译chromium最新源码 – Build Chrome on Mac OS 10.10



3.check out source code:

$ fetch –nohooks chromium     # Optionally, –no-history

$ fetch –nohooks blink        # Optionally, –no-history

The checkout will be from 6GB to 22GB, depending on your choices.

You can fetch one of two targets: chromium or blink. Either choice will clone both the Chromium and Blink repos, but there’s a small difference.

  • fetch chromium will use the Blink version that’s rolled into Chromium via DEPS (usually a few hours old). This choice is easier if working only on Chromium.
  • fetch blink will always retrieve the latest Blink (ToT) version, and is useful if working on Blink.

Either choice, the fetch will consume ~22GB of disk space.  However, if you choose to clone without git history, the checkout will total ~6.5GB.

Use –no-history with fetch to create shallow clones. Use if you don’t need repo history or want a faster clone. Later,  git fetch –unshallow will deepen these shallow clones.


fetch –nohooks chromium –nosvn=True  或者 fetch –nohooks –no-history chromium

4.如果第3步未能成功完成,则执行 gclient sync –force 继续更新.



$ ./build/


需要暗转xcode5 (或以上。参考:


需要VS2013: 参考:

6.Run post-sync hooks

$ gclient runhooks

7.Update, checkout

$ git rebase-update

$ gclient sync


Chrome使用的是GYP (Generate-Your-Project)作为build工具:使用以下命令生成build file:

export GYP_GENERATORS=ninja,xcode-ninja



$ ./build/gyp_chromium -Goutput_dir=out_cros


最后Building Chrome

ninja -C out/Release/ chrome

9.有可能在第5步中的最后ninja -C out/Debug/ chrome命令中报下面的错误:

ninja: error: ‘../../native_client/toolchain/mac_x86/nacl_x86_newlib/nacl_x86_newlib.json’, needed by ‘gen/tc_irt/lib64/libppapi_proxy_nacl.a’, missing and no known rule to make it

,此时需要执行gclient runhooks(The hooks are required to download some prebuilts / sdks (like nacl, for which you’re getting an error).)来下载部分相应的依赖库. 如果步骤6执行过则应该没有问题。

以上总结参考Chrome 官方给出的 Get the Code: Checkout, Build, Run & Submit


Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s