拉取 chromium 指定版本的倉庫代碼

在編譯指定版本(比如 75.0.3770)的 cronet-ios 時,總是出現下圖的錯誤 is not one of the valid types:

主要錯誤內容爲:Only source, header, and object files belong in the sources of a static_library
is not one of the valid types

ERROR at //third_party/protobuf/proto_library.gni : Only source, header, and object files belong in the sources of a static_library is not one of the valid types

sources = get_target_outputs(":$action_name")

後來定位到是缺少指定版本下特定的依賴文件,因此需要重新同步該版本的 chromium 倉庫;

代碼拉取方式如下:

fetch --nohooks --no-history ios  // 建立 chromium 本地 git 倉庫,如果已經建好可忽略此命令
git fetch origin 75.0.3770.142
git checkout -b chromium-ios-75.0.3770.142 FETCH_HEAD

在上述步驟之後再增加下面命令,下載該分支的依賴文件:

gclient sync --with_branch_heads

嘗試重新編譯,成功。

官方論壇也有類似的帖子:Error generating Ninja build files

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章