Skip to content

Instantly share code, notes, and snippets.

@nickdiego
Created February 8, 2022 22:42
Show Gist options
  • Save nickdiego/ed7f605eb122576f75b2748089b29300 to your computer and use it in GitHub Desktop.
Save nickdiego/ed7f605eb122576f75b2748089b29300 to your computer and use it in GitHub Desktop.

Finding out GN args used by CI/CQ bots

  • Bots use mb tool, which is actually a "thin" python script that stands for "Meta-Build wrapper". Detailed docs here.
  • Chromium builder configurations live at //tools/mb/mb_config.pyl file.

In order to find out, for example, the GN args used to build the official binaries of Lacros Chrome for amd64-generic boards, look for the builder group and builder name and pass them in to mb.py lookup scrip, as follows:

$ tools/mb/mb.py lookup --quiet -m tryserver.chrome -b lacros-amd64-generic-chrome

import("//build/args/chromeos/amd64-generic-crostoolchain.gni")
chromeos_is_browser_only = true
cros_host_sysroot = "//build/linux/debian_sid_amd64-sysroot"
cros_v8_snapshot_sysroot = "//build/linux/debian_sid_amd64-sysroot"
dcheck_always_on = false
is_cfi = true
is_chrome_branded = true
is_chromeos_device = true
is_official_build = true
ozone_platform_headless = true
symbol_level = 1
target_os = "chromeos"
use_goma = true
use_thin_lto = true

Rationale for builder group, builder name and GN args relationship and how they are linked in the mb_config.pyl file:

  • tryserver.chrome builder group is listed here
  • lacros-amd64-generic-chrome builder name is listed here
  • Which contains chromeos_amd64-generic_lacros_official config, defined here
  • Which, in turn, is recursively defined by other configs, eg: 'chromeos_amd64-generic-crostoolchain', 'amd64-lacros', 'official', 'minimal_symbols', 'cfi', 'thin_lto'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment