Some command line parameters affect the operation of Buck itself, regardless of which subcommand is being run.
buck targets --verbose 10
--verboseSets the verbosity level of the console output.
--no-cacheDisables the build artifact cache.
--configOverrides settings specified in
buck build --config cache.mode=dir ...
Note that overriding values of
.buckconfigfrom the command line makes reproducing the build very hard. The preferred method of overriding values of
--num-threadsThe 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
.buckconfigfile. The order of precedence for setting the number of builds threads (from highest to lowest) is: command line option,
.buckconfigsetting, default value. The number of active threads may not always be equal to this argument.
@/path/to/commandline-argsAdditional 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 --verbose # File config/gcc @config/common --config cxx.cxx=/usr/bin/g++ ... # File config/clang @config/common --config cxx.cxx=/usr/bin/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.