Buck: Common Parameters

Common Parameters

Some command line parameters affect the operation of Buck itself, regardless of which subcommand is being run.

buck targets --verbose 10


  • --verbose Sets the verbosity level of the console output.
  • --no-cache Disables the build artifact cache.
  • --config Overrides settings specified in .buckconfig.

    buck build --config cache.mode=dir ...

    Note that overriding values of .buckconfig from the command line makes reproducing the build very hard. The preferred method of overriding values of .buckconfig is via .buckconfig.local.

  • --num-threads The number of threads that buck should use when executing jobs. This defaults to 1.25 times the number of processors in the system (on systems with hyperthreading, this means that each core is counted twice). The number of threads to use for building can also be set by adding a "threads" key to the "build" section of the .buckconfig file. The order of precedence for setting the number of builds threads (from highest to lowest) is: command line option, .buckconfig setting, default value. The number of active threads may not always be equal to this argument.
  • @/path/to/commandline-args Additional command line arguments can be stored in external files, one argument per line. These arguments can also be @ arguments, which will include a second file's contents as arguments.
    # File config/common
    # File config/gcc
    # File config/clang
    buck build @config/gcc foo/bar:
    buck build @config/clang foo/bar:

    If Buck is regularly invoked with different sets of arguments, this is the preferred approach, as argument files can be stored in source control, making builds more reproducible.