Google is committed to advancing racial equity for Black communities. See how.

fx goma

manage Goma distributed compilation client

Usage: fx goma [--browser] [--update]

This makes sure that both initial setup tasks are complete and that
periodic maintenance actions are done.  It's probably only really
necessary to run it once, but it should be harmless (and reasonably
fast) to run it again any time, such as after a `jiri update`.  It's
just not a good idea to run it while you have a build running in the
background, since it may result in restarting the local Goma client
service and causing all new compilation commands to fail for a moment.

See also `fx goma_auth` and `fx goma_ctl`.  This mostly just runs those.

The `fx goma_auth` command is usually only needed once at setup time to
run `fx goma_auth login`, which is done by `fx goma` if needed.  Use `fx
goma_auth help` for details on `fx goma_auth` subcommands.  If something
seems to be wrong, you can run the command `fx goma_auth logout` and
then repeat `fx goma`.

The `fx goma_ctl` command controls the Goma client service on your local
machine.  Use `fx goma_ctl help` for details.  The common subcommand used
every day is `fx goma_ctl ensure_start` to make sure your local client
service is running.  (`fx goma` does this for you but only after a few other
checks that might be somewhat slower than `fx goma_ctl ensure_start` alone.)

The `--browser` switch is passed along to `fx goma_auth login` so that
it attempts to launch a browser window to perform authentication.  This
may or may not work, depending on your desktop and command-line setup.
Without that switch, it will print out a URL you need to visit in your
browser to (authenticate and) copy a token to paste into a prompt.

**NOTE:** _The following features are temporary for the transition._

`fx goma` checks for an old Goma installation and recommends commands to
update to the current recommended style managed by `fx goma`.

It also checks the current Fuchsia build directory's Goma configuration.
This is the only aspect of `fx goma` that refers to a build directory
(as controlled by the `--dir` switch to `fx` or the most recent `fx set`
or `fx use` command).  It will report whether the build is set to use
the recommended Goma setup managed by `fx goma`.  If given the
`--update` switch, it will modify the existing `args.gn` and then re-run
`fx gen` to enable Goma with the standard setup.  This results in the
same configuration that a fresh `fx set` will with the `--goma` switch
(or without the switch, once `fx goma` has been done once).

goma source code