Re: Google GN support

Joel Winarske

I had to revisit this for Google Flutter LTS support as upstream (Google Flutter team) wasn't interested in providing tar.xz releases.

We have two working solutions for Flutter gclient as of today.

1. gclient fetcher.  This fetches the project using gclient and archives the whole source tree.  I call it the gclient snapshot solution.  Downside is initial fetch time due to archive time, but subsequent build times are good.  So only really useful if you don't switch versions often.

2. Pre-process project using python script and add cipd fetcher support to layer.  This script creates an inc file that gets included by a recipe.  Initial fetch time is about 2.5x build time, with similar build times to gclient fetcher; ~3 minutes, some sub 3 minutes.  The current approach before this method average build times were ~6 minutes.  So this approach improves build time, and provides LTS.  It factors out the use of gclient/depot_tools in the fetch process.  The script generates a do_run_hooks task using gn conditionals.

script output

cipd:// fetcher impl:

It currently only works out of the box for the flutter project, but I did use it to create a recipe for luci-go -> cipd.

I mocked up changes to support the v8 project; see gaps for generic support.  It does require dynamically compiling python code to manage conditionals, and needs a bit more work.  After which should work for any gclient based project.

gs:// fetcher (Google Storage) support is also planned.  So in cases which download google storage artifacts in hook, it would allow moving that to SRC_URI as gs:// element for LTS scenario.

If anyone finds this useful/interesting or they want to collaborate on improvements let me know.

I do think cipd:// fetcher support would be a good addition to oe-core.


On Tue, Oct 5, 2021 at 3:55 PM Joel Winarske via <> wrote:

> look at meta-browser/meta-chromium as well.

The download archive (tar.xz) approach may be the easiest solution.  Then one would just need to make a versioned recipe for each LTS.

Thanks Khem!

Join to automatically receive all group messages.