beacon icon indicating copy to clipboard operation
beacon copied to clipboard

Use GN for all the things

Open buffrr opened this issue 3 years ago • 0 comments

We can divide butil into scripts instead and have GN call those since it's more flexible and some people may already have experience with it.

What's a bit tricky this repo is mounted at src/beacon after fetching chromium at src/ so chromium can depend on it internally using //beacon/... and this repo can depend on chromium libs.

Chromium builds work naturally this way (without Beacon):

  1. git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
  2. Add depot tools to your path
  3. Use gsync/fetch from depot tools to pull chromium at src/
  4. gen gen out/Debug or whatever name. Set out/Debug/args.gn for the build
  5. call autoninja -C out/Debug chrome

At step 3 beacon is mounted at src/beacon and some patches and overrides get applied that's what butil does. A patch applied by butil links our BUILD.gn to chromium's main BUILD.gn file so that it's possible to build beacon using autoninja -C out/Debug beacon

So we need to at least mount this repo at src/beacon and i suppose we can later link our GN file somehow. Perhaps we can have a repo similar to depot_tools with a script to do this initial dance but that may be overkill. @mdaniel may have some thoughts on this.

buffrr avatar Apr 27 '22 17:04 buffrr