如何构建特定版本的 Chromium?

How to build a specific version of Chromium?

我想构建 Chromium 的最新稳定版本(62.0.3202.84 在撰写本文时,请参阅 OmahaProxy)。

build instructions 对于当前的开发版本工作得很好。

this question, the Brave wiki 和其他一些来源,获取和构建特定版本的说明似乎非常清楚:

git fetch origin 62.0.3202.84
git checkout -b my_stable_branch FETCH_HEAD
# hooks and dependencies if needed, commits, compilation...

但是,这 似乎对我有用。当我为 FETCH_HEAD 创建分支时,快速 git log 显示我有来自 master.

的最新提交

我误会了什么?

编辑:

如果我从 master 执行 ,它会“成功”运行,但我最终还是构建了 master 而不是我想要的。

如果我首先从特定标签(如 the Chromium documentation 中指定的)创建分支,例如 62.0.3202.84,或者即使我只是检查它而没有分支,gclient sync --with_branch_heads 也会失败给我以下错误:

Error: Command 'git checkout --quiet 6e4c388c0117fe408b66fbede91081fb1018c5fe' returned non-zero exit status 128 in /path/to/chromium/src/media/cdm/api
fatal: reference is not a tree: 6e4c388c0117fe408b66fbede91081fb1018c5fe

我成功编译了 3239 版,所以我知道问题出在 3202 的 DEPS 文件中引用错误。 (这很奇怪...)

因此以下步骤实际上是正确的:

git checkout -b your_branch xx.x.xxxx.xx
gclient sync

编辑 2018-07-02: 根据 this page,从版本 3420 开始,应该可以正确同步依赖项。