bazel

Bazel the build system!

Subcommands

NameDescription
runRuns the specified target
testBuilds and runs the specified test targets
buildBuilds the specified targets

Options

NameDescription
--autodetect_server_javabaseBack to the local JDK for running the bazel server and instead exits
--noautodetect_server_javabaseDoes not fall back to the local JDK for running the bazel server and instead exits
--batchRun as just a client process without a server
--nobatchRun with a server
--batch_cpu_schedulingOnly on Linux; use 'batch' CPU scheduling for Bazel
--nobatch_cpu_schedulingOnly on Linux; Bazel does not perform a system call
--bazelrc <bazelrc path>The location of the user .bazelrc file containing default values of Bazel options
--block_for_lockWait for a running command to complete
--noblock_for_lockBazel does not wait for a running command to complete, but instead exits immediately
--client_debugLog debug information from the client to stderr. Changing this option will not cause the server to restart
--noclient_debugDon't log debug information from the client to stderr
--connect_timeout_secs <time>The amount of time the client waits for each attempt to connect to the server
--expand_configs_in_placeChanged the expansion of --config flags to be done in-place
--noexpand_configs_in_place--config flags in a fixed point expansion between normal rc options and command-line specified options
--failure_detail_out <path>Specifies a location to write a failure_detail protobuf message if the server experiences a failure and cannot report it via gRPC, as normal. Otherwise, the location will be ${OUTPUT_BASE}/failure_detail.rawproto
--home_rcLook for the home bazelrc file at $HOME/.bazelrc
--nohome_rcDon't look for the home bazelrc file at $HOME/.bazelrc
--idle_server_tasksRun System.gc() when the server is idle
--noidle_server_tasksDon't run System.gc() when the server is idle
--ignore_all_rc_filesDisables all rc files, regardless of the values of other rc-modifying flags, even if these flags come later in the list of startup options
--noignore_all_rc_filesEnables all rc files
--io_nice_level <io-level>Only on Linux; set a level from 0-7 for best-effort IO scheduling using the sys_ioprio_set system call. 0 is highest priority, 7 is lowest
--local_startup_timeout_secs <seconds>The maximum amount of time the client waits to connect to the server
--macos_qos_class <QoS service class>Sets the QoS service class of the bazel server when running on macOS
--max_idle_secs <seconds>The number of seconds the build server will wait idling before shutting down
--output_base <Path>Specifies the output location to which all build output will be written
--output_base_root <Path>The user-specific directory beneath which all build outputs are written
--preemptibleIf true, the command can be preempted if another command is started
--nopreemptibleIf true, the command can be preempted if another command is started
--server_jvm_out <Path>The location to write the server's JVM's output
--shutdown_on_low_sys_memLinux only. If max_idle_secs is set and the build server has been idle for a while, shut down the server when the system is low on free RAM
--noshutdown_on_low_sys_memLinux only. Don't shut down the server when the system is low on free RAM
--system_rcLook for the system-wide bazelrc
--nosystem_rcDon't look for the system-wide bazelrc
--unlimit_coredumpsRaises the soft coredump limit to the hard limit to make coredumps of the server (including the JVM) and the client possible under common conditions
--nounlimit_coredumpsDon't raise the soft coredump limit to the hard limit to make coredumps of the server (including the JVM) and the client possible under common conditions
--watchfsUse the operating system's file watch service for local changes instead of scanning every file for a change
--nowatchfsScan every file for a change
--windows_enable_symlinksReal symbolic links will be created on Windows instead of file copying
--nowindows_enable_symlinksReal symbolic links will be created via file copying
--workspace_rcLook for the workspace bazelrc file at $workspace/.bazelrc
--noworkspace_rcDon't look for the workspace bazelrc file at $workspace/.bazelrc