fx build

奔跑忍者,缔造紫红色

usage: fx build [options] [LABELS_OR_TARGETS]... [-- NINJA_OPTIONS...]

Builds a set of GN or Ninja targets after performing a few correctness checks for
the Fuchsia build. Ninja-specific options must be provided after a -- specifier.

If `FX_BUILD_WITH_LABELS=1` is set in the environment, LABELS_OR_TARGETS is a
list of Ninja target path, GN labels (beginning with //) or `--toolchain=NAME`
options or related aliases (see below). For example, the following lines
are equivalent ways to ask for the host `zbi` tool to be built:

   fx build --host //zircon/tools/zbi
   fx build --host //zircon/tools/zbi:zbi
   fx build --toolchain=//build/toolchain:host_x64 //zircon/tools/zbi
   fx build '//zircon/tools/zbi(//build/toolchain:host_x64)'
   fx build host_x64/zbi

The first line above is favored. Using the last line will print a warning
instructing the user which (optional) toolchain option + label to use instead.

If `FX_BUILD_WITH_LABELS=1` is *not* set, then LABELS_OR_TARGETS must be
a list of Ninja target paths only.

optional arguments:
  -h, --help               Print this message. Use '-- --help' to print
                           Ninja-specific help.
  --no-checks              Disable consistency checks (for fx development only).
  --log LOGFILE            Print debug information to LOGFILE. Please attach
                           the resulting file when reporting bugs.
  --fint-params-path PATH  Path to a fint params file used by an infra
                           builder. This is useful for reproducing the exact
                           set of targets built by the infrastructure.

  --toolchain=TOOLCHAIN    Specify the current GN toolchain suffix to use for
                           GN labels that appear after this option.

  -j <count>               Specify an explicit max job count for both Ninja
                           and Bazel.

  --host                   Alias for --toolchain=host
  --default                Alias for --toolchain=default
  --fuchsia                Alias for --toolchain=fuchsia
  --fidl                   Alias for --toolchain=fidl

  --help-toolchains        Print list of valid TOOLCHAIN values.

Run `fx build -h` to see Ninja argument details.

build 源代码