CLI Reference for Bazel v7.0.0
Return to release homeCommands
analyze-profile
Analyzes build profile data.
bazel analyze-profile <path>
- Option inheritance
- None
- Hidden
- False
- Must run in workspace
- False
- Triggers build
- False
aquery
Analyzes the given targets and queries the action graph.
bazel aquery <label>
- Option inheritance
configuration
build
- Hidden
- False
- Must run in workspace
- True
- Triggers build
- True
build
Builds the specified targets.
bazel build <label>
- Option inheritance
configuration
- Hidden
- False
- Must run in workspace
- True
- Triggers build
- True
canonicalize-flags
Canonicalizes a list of bazel options.
bazel canonicalize-flags
- Option inheritance
build
- Hidden
- False
- Must run in workspace
- False
- Triggers build
- False
clean
Removes output files and optionally stops the server.
bazel clean
- Option inheritance
build
- Hidden
- False
- Must run in workspace
- True
- Triggers build
- True
config
Displays details of configurations.
bazel config <string>
- Option inheritance
configuration
build
- Hidden
- True
- Must run in workspace
- True
- Triggers build
- True
coverage
Generates code coverage report for specified test targets.
bazel coverage <label-test>
- Option inheritance
test
- Hidden
- False
- Must run in workspace
- True
- Triggers build
- True
cquery
Loads, analyzes, and queries the specified targets w/ configurations.
bazel cquery <label>
- Option inheritance
configuration
test
- Hidden
- False
- Must run in workspace
- True
- Triggers build
- True
dump
Dumps the internal state of the bazel server process.
bazel dump
- Option inheritance
- None
- Hidden
- False
- Must run in workspace
- False
- Triggers build
- False
fetch
Fetches external repositories that are prerequisites to the targets.
bazel fetch <label>
- Option inheritance
- None
- Hidden
- False
- Must run in workspace
- True
- Triggers build
- False
help
Prints help for commands, or the index.
bazel help <command|{startup_options,target-syntax,info-keys}>
- Option inheritance
- None
- Hidden
- False
- Must run in workspace
- False
- Triggers build
- False
info
Displays runtime info about the bazel server.
bazel info <info-key>
- Option inheritance
build
- Hidden
- False
- Must run in workspace
- True
- Triggers build
- True
license
Prints the license of this software.
bazel license
- Option inheritance
- None
- Hidden
- False
- Must run in workspace
- False
- Triggers build
- False
mobile-install
Installs targets to mobile devices.
bazel mobile-install <label>
- Option inheritance
build
- Hidden
- False
- Must run in workspace
- True
- Triggers build
- True
mod
Queries the Bzlmod external dependency graph
bazel mod
- Option inheritance
- None
- Hidden
- False
- Must run in workspace
- True
- Triggers build
- False
print_action
Prints the command line args for compiling a file.
bazel print_action <label>
- Option inheritance
build
- Hidden
- False
- Must run in workspace
- True
- Triggers build
- True
query
Executes a dependency graph query.
bazel query <label>
- Option inheritance
- None
- Hidden
- False
- Must run in workspace
- True
- Triggers build
- False
run
Runs the specified target.
bazel run <label-bin>
- Option inheritance
build
- Hidden
- False
- Must run in workspace
- True
- Triggers build
- True
shutdown
Stops the bazel server.
bazel shutdown
- Option inheritance
- None
- Hidden
- False
- Must run in workspace
- False
- Triggers build
- False
sync
Syncs all repositories specified in the workspace file
bazel sync
- Option inheritance
- None
- Hidden
- False
- Must run in workspace
- True
- Triggers build
- False
test
Builds and runs the specified test targets.
bazel test <label-test>
- Option inheritance
build
- Hidden
- False
- Must run in workspace
- True
- Triggers build
- True
version
Prints version information for bazel.
bazel version
- Option inheritance
- None
- Hidden
- False
- Must run in workspace
- False
- Triggers build
- False
Options
--action_cache
🔗
Use with: dump
Dump action cache content.
--[no]action_cache
- Allows multiple
- False
- Documentation category
output_selection
- Option effect tags
bazel_monitoring
--action_cache_store_output_metadata
🔗
Use with: build
no-op
--[no]action_cache_store_output_metadata
- Old name
--[no]experimental_action_cache_store_output_metadata
- Warn old name
- True
- Allows multiple
- False
- Documentation category
undocumented
- Option effect tags
bazel_internal_configuration
host_machine_resource_optimizations
--action_env
🔗
Use with: configuration
Specifies the set of environment variables available to actions with target configuration. Variables can be either specified by name, in which case the value will be taken from the invocation environment, or by the name=value pair which sets the value independent of the invocation environment. This option can be used multiple times; for options given for the same variable, the latest wins, options for different variables accumulate.
--action_env
- Allows multiple
- True
- Documentation category
output_parameters
- Option effect tags
action_command_lines
--adb
🔗
Use with: mobile-install
adb binary to use for the 'mobile-install' command. If unspecified, the one in the Android SDK specified by the --android_sdk command line option (or the default SDK if --android_sdk is not specified) is used.
--adb
- Allows multiple
- False
- Documentation category
toolchain
- Option effect tags
changes_inputs
--adb_arg
🔗
Use with: mobile-install
Extra arguments to pass to adb. Usually used to designate a device to install to.
--adb_arg
- Allows multiple
- True
- Documentation category
output_parameters
- Option effect tags
action_command_lines
--all
🔗
Use with: fetch
Fetches all external repositories necessary for building any target or repository. Only works when --enable_bzlmod is on.
--[no]all
- Allows multiple
- False
- Documentation category
execution_strategy
- Option effect tags
changes_inputs
--allow_analysis_cache_discard
🔗
Use with: build
If discarding the analysis cache due to a change in the build system, setting this option to false will cause bazel to exit, rather than continuing with the build. This option has no effect when 'discard_analysis_cache' is also set.
--[no]allow_analysis_cache_discard
- Allows multiple
- False
- Documentation category
uncategorized
- Option effect tags
eagerness_to_exit
--allow_analysis_failures
🔗
Use with: configuration
If true, an analysis failure of a rule target results in the target's propagation of an instance of AnalysisFailureInfo containing the error description, instead of resulting in a build failure.
--[no]allow_analysis_failures
- Allows multiple
- False
- Documentation category
testing
- Option effect tags
loading_and_analysis
- Option metadata tags
experimental
--allow_unresolved_symlinks
🔗
Use with: configuration
If enabled, Bazel allows the use of ctx.action.declare_symlink() and the use of ctx.actions.symlink() without a target file, thus allowing the creation of unresolved symlinks. Unresolved symlinks inside tree artifacts are not currently supported.
--[no]allow_unresolved_symlinks
- Old name
--[no]experimental_allow_unresolved_symlinks
- Warn old name
- True
- Allows multiple
- False
- Documentation category
undocumented
- Option effect tags
loses_incremental_state
loading_and_analysis
--allow_yanked_versions
🔗
Use with: common
Specified the module versions in the form of `<module1>@<version1>,<module2>@<version2>` that will be allowed in the resolved dependency graph even if they are declared yanked in the registry where they come from (if they are not coming from a NonRegistryOverride). Otherwise, yanked versions will cause the resolution to fail. You can also define allowed yanked version with the `BZLMOD_ALLOW_YANKED_VERSIONS` environment variable. You can disable this check by using the keyword 'all' (not recommended).
--allow_yanked_versions
- Allows multiple
- True
- Documentation category
bzlmod
- Option effect tags
loading_and_analysis
--allowed_local_actions_regex
🔗
Use with: build
A regex whitelist for action types which may be run locally. If unset, all actions are allowed to execute locally
--allowed_local_actions_regex
- Allows multiple
- False
- Documentation category
undocumented
- Option effect tags
unknown
--always_profile_slow_operations
🔗
Use with: common
Whether profiling slow operations is always turned on
--[no]always_profile_slow_operations
- Allows multiple
- False
- Documentation category
undocumented
- Option effect tags
affects_outputs
bazel_internal_configuration
--analysis_testing_deps_limit
🔗
Use with: configuration
Sets the maximum number of transitive dependencies through a rule attribute with a for_analysis_testing configuration transition. Exceeding this limit will result in a rule error.
--analysis_testing_deps_limit
- Allows multiple
- False
- Documentation category
testing
- Option effect tags
loading_and_analysis
--analyze
🔗
Use with: build
Execute the loading/analysis phase; this is the usual behaviour. Specifying --noanalyzecauses the build to stop before starting the loading/analysis phase, just doing target pattern parsing and returning zero iff that completed successfully; this mode is useful for testing.
--[no]analyze
- Allows multiple
- False
- Documentation category
undocumented
- Option effect tags
loading_and_analysis
affects_outputs
--android_compiler
🔗
Use with: configuration
The Android target compiler.
--android_compiler
- Allows multiple
- False
- Documentation category
toolchain
- Option effect tags
affects_outputs
loading_and_analysis
loses_incremental_state
--android_cpu
🔗
Use with: configuration
The Android target CPU.
--android_cpu
- Allows multiple
- False
- Documentation category
output_parameters
- Option effect tags
affects_outputs
loading_and_analysis
loses_incremental_state
--android_crosstool_top
🔗
Use with: configuration
The location of the C++ compiler used for Android builds.
--android_crosstool_top
- Allows multiple
- False
- Documentation category
toolchain
- Option effect tags
affects_outputs
changes_inputs
loading_and_analysis
loses_incremental_state
--android_databinding_use_androidx
🔗
Use with: configuration
Generate AndroidX-compatible data-binding files. This is only used with databinding v2. This flag is a no-op.
--[no]android_databinding_use_androidx
- Allows multiple
- False
- Documentation category
output_parameters
- Option effect tags
affects_outputs
loading_and_analysis
loses_incremental_state
- Option metadata tags
experimental
--android_databinding_use_v3_4_args
🔗
Use with: configuration
Use android databinding v2 with 3.4.0 argument. This flag is a no-op.
--[no]android_databinding_use_v3_4_args
- Allows multiple
- False
- Documentation category
output_parameters
- Option effect tags
affects_outputs
loading_and_analysis
loses_incremental_state
- Option metadata tags
experimental
--android_dynamic_mode
🔗
Use with: configuration
Determines whether C++ deps of Android rules will be linked dynamically when a cc_binary does not explicitly create a shared library. 'default' means bazel will choose whether to link dynamically. 'fully' means all libraries will be linked dynamically. 'off' means that all libraries will be linked in mostly static mode.
--android_dynamic_mode
- Allows multiple
- False
- Documentation category
output_parameters
- Option effect tags
affects_outputs
loading_and_analysis
--android_fixed_resource_neverlinking
🔗
Use with: configuration
If true, resources will properly not get propagated through neverlinked libraries. Otherwise, the old behavior of propagating those resources if no resource-related attributes are specified in the neverlink library will be preserved.
--[no]android_fixed_resource_neverlinking
- Allows multiple
- False
- Documentation category
undocumented
- Option effect tags
loading_and_analysis
--android_grte_top
🔗
Use with: configuration
The Android target grte_top.
--android_grte_top
- Allows multiple
- False
- Documentation category
toolchain
- Option effect tags
changes_inputs
loading_and_analysis
loses_incremental_state
--android_manifest_merger
🔗
Use with: configuration
Selects the manifest merger to use for android_binary rules. Flag to help thetransition to the Android manifest merger from the legacy merger.
--android_manifest_merger
- Allows multiple
- False
- Documentation category
toolchain
- Option effect tags
affects_outputs
loading_and_analysis
loses_incremental_state
--android_manifest_merger_order
🔗
Use with: configuration
Sets the order of manifests passed to the manifest merger for Android binaries. ALPHABETICAL means manifests are sorted by path relative to the execroot. ALPHABETICAL_BY_CONFIGURATION means manifests are sorted by paths relative to the configuration directory within the output directory. DEPENDENCY means manifests are ordered with each library's manifest coming before the manifests of its dependencies.
--android_manifest_merger_order
- Allows multiple
- False
- Documentation category
output_parameters
- Option effect tags
action_command_lines
execution
--android_migration_tag_check
🔗
Use with: configuration
If enabled, strict usage of the Starlark migration tag is enabled for android rules. Prefer using --incompatible_disable_native_android_rules.
--[no]android_migration_tag_check
- Allows multiple
- False
- Documentation category
undocumented
- Option effect tags
eagerness_to_exit
--android_platforms
🔗
Use with: configuration
Sets the platforms that android_binary targets use. If multiple platforms are specified, then the binary is a fat APKs, which contains native binaries for each specified target platform.
--android_platforms
- Allows multiple
- False
- Documentation category
toolchain
- Option effect tags
changes_inputs
loading_and_analysis
loses_incremental_state
--android_resource_shrinking
🔗
Use with: configuration
Enables resource shrinking for android_binary APKs that use ProGuard.
--[no]android_resource_shrinking
- Allows multiple
- False
- Documentation category
output_parameters
- Option effect tags
affects_outputs
loading_and_analysis
--android_sdk
🔗
Use with: configuration
Specifies Android SDK/platform that is used to build Android applications.
--android_sdk
- Allows multiple
- False
- Documentation category
toolchain
- Option effect tags
changes_inputs
loading_and_analysis
loses_incremental_state
--announce
🔗
Use with: build
Deprecated. No-op.
--[no]announce
- Allows multiple
- False
- Deprecation warning
- This option is now deprecated and is a no-op
- Documentation category
undocumented
- Option effect tags
affects_outputs
--announce_rc
🔗
Use with: common
Whether to announce rc options.
--[no]announce_rc
- Allows multiple
- False
- Documentation category
logging
- Option effect tags
affects_outputs
--apk_signing_method
🔗
Use with: configuration
Implementation to use to sign APKs
--apk_signing_method
- Allows multiple
- False
- Documentation category
signing
- Option effect tags
action_command_lines
affects_outputs
loading_and_analysis
--apple_crosstool_top
🔗
Use with: configuration
The label of the crosstool package to be used in Apple and Objc rules and their dependencies.
--apple_crosstool_top
- Allows multiple
- False
- Documentation category
toolchain
- Option effect tags
loses_incremental_state
changes_inputs
--apple_generate_dsym
🔗
Use with: configuration
Whether to generate debug symbol(.dSYM) file(s).
--[no]apple_generate_dsym
- Allows multiple
- False
- Documentation category
output_selection
- Option effect tags
affects_outputs
action_command_lines
--apple_platform_type
🔗
Use with: configuration
Don't set this value from the command line - it is derived from other flags and configuration transitions derived from rule attributes
--apple_platform_type
- Allows multiple
- False
- Documentation category
undocumented
- Option effect tags
bazel_internal_configuration
--apple_platforms
🔗
Use with: configuration
Comma-separated list of platforms to use when building Apple binaries.
--apple_platforms
- Allows multiple
- False
- Documentation category
undocumented
- Option effect tags
loses_incremental_state
loading_and_analysis
--apple_split_cpu
🔗
Use with: configuration
Don't set this value from the command line - it is derived from other flags and configuration transitions derived from rule attributes
--apple_split_cpu
- Allows multiple
- False
- Documentation category
undocumented
- Option effect tags
bazel_internal_configuration
--archived_tree_artifact_mnemonics_filter
🔗
Use with: configuration
Regex filter for mnemonics of actions for which we should create archived tree artifacts. This option is a no-op for actions which do not generate tree artifacts.
--archived_tree_artifact_mnemonics_filter
- Allows multiple
- False
- Documentation category
undocumented
- Option effect tags
loading_and_analysis
execution
--aspect_deps
🔗
Use with: aquery
cquery
query
How to resolve aspect dependencies when the output format is one of {xml,proto,record}. 'off' means no aspect dependencies are resolved, 'conservative' (the default) means all declared aspect dependencies are added regardless of whether they are given the rule class of direct dependencies, 'precise' means that only those aspects are added that are possibly active given the rule class of the direct dependencies. Note that precise mode requires loading other packages to evaluate a single target thus making it slower than the other modes. Also note that even precise mode is not completely precise: the decision whether to compute an aspect is decided in the analysis phase, which is not run during 'bazel query'.
--aspect_deps
- Allows multiple
- False
- Documentation category
query
- Option effect tags
build_file_semantics
--aspects
🔗
Use with: build
Comma-separated list of aspects to be applied to top-level targets. In the list, if aspect some_aspect specifies required aspect providers via required_aspect_providers, some_aspect will run after every aspect that was mentioned before it in the aspects list whose advertised providers satisfy some_aspect required aspect providers. Moreover, some_aspect will run after all its required aspects specified by requires attribute. some_aspect will then have access to the values of those aspects' providers. <bzl-file-label>%<aspect_name>, for example '//tools:my_def.bzl%my_aspect', where 'my_aspect' is a top-level value from a file tools/my_def.bzl
--aspects
- Allows multiple
- True
- Documentation category
output_parameters
- Option effect tags
unknown
--aspects_parameters
🔗
Use with: build
Specifies the values of the command-line aspects parameters. Each parameter value is specified via <param_name>=<param_value>, for example 'my_param=my_val' where 'my_param' is a parameter of some aspect in --aspects list or required by an aspect in the list. This option can be used multiple times. However, it is not allowed to assign values to the same parameter more than once.
--aspects_parameters
- Allows multiple
- True
- Documentation category
generic_inputs
- Option effect tags
loading_and_analysis
--async
🔗
Use with: clean
If true, output cleaning is asynchronous. When this command completes, it will be safe to execute new commands in the same client, even though the deletion may continue in the background.
--[no]async
- Allows multiple
- False
- Documentation category
output_selection
- Option effect tags
host_machine_resource_optimizations
--attempt_to_print_relative_paths
🔗
Use with: common
When printing the location part of messages, attempt to use a path relative to the workspace directory or one of the directories specified by --package_path.
--[no]attempt_to_print_relative_paths
- Old name
--[no]experimental_ui_attempt_to_print_relative_paths
- Warn old name
- True
- Allows multiple
- False
- Documentation category
logging
- Option effect tags
terminal_output
--auto_cpu_environment_group
🔗
Use with: configuration
Declare the environment_group to use for automatically mapping cpu values to target_environment values.
--auto_cpu_environment_group
- Allows multiple
- False
- Documentation category
input_strictness
- Option effect tags
changes_inputs
loading_and_analysis
- Option metadata tags
experimental
--auto_output_filter
🔗
Use with: build
If --output_filter is not specified, then the value for this option is used create a filter automatically. Allowed values are 'none' (filter nothing / show everything), 'all' (filter everything / show nothing), 'packages' (include output from rules in packages mentioned on the Blaze command line), and 'subpackages' (like 'packages', but also include subpackages). For the 'packages' and 'subpackages' values //java/foo and //javatests/foo are treated as one package)'.
--auto_output_filter
- Allows multiple
- False
- Documentation category
uncategorized
- Option effect tags
unknown
--autodetect_server_javabase
🔗
Use with: startup
When --noautodetect_server_javabase is passed, Bazel does not fall back to the local JDK for running the bazel server and instead exits.
--[no]autodetect_server_javabase
- Allows multiple
- False
- Documentation category
bazel_client_options
- Option effect tags
affects_outputs
loses_incremental_state
--base_module
🔗
Use with: mod
Specify a module relative to which the specified target repos will be interpreted.
--base_module
- Allows multiple
- False
- Documentation category
mod_command
- Option effect tags
terminal_output
--batch
🔗
Use with: startup
If set, Bazel will be run as just a client process without a server, instead of in the standard client/server mode. This is deprecated and will be removed, please prefer shutting down the server explicitly if you wish to avoid lingering servers.
--[no]batch
- Allows multiple
- False
- Documentation category
bazel_client_options
- Option effect tags
loses_incremental_state
bazel_internal_configuration
- Option metadata tags
deprecated
--batch_cpu_scheduling
🔗
Use with: startup
Only on Linux; use 'batch' CPU scheduling for Blaze. This policy is useful for workloads that are non-interactive, but do not want to lower their nice value. See 'man 2 sched_setscheduler'. If false, then Bazel does not perform a system call.
--[no]batch_cpu_scheduling
- Allows multiple
- False
- Documentation category
bazel_client_options
- Option effect tags
host_machine_resource_optimizations
--bazelrc
🔗
Use with: startup
The location of the user .bazelrc file containing default values of Bazel options. /dev/null indicates that all further `--bazelrc`s will be ignored, which is useful to disable the search for a user rc file, e.g. in release builds. This option can also be specified multiple times. E.g. with `--bazelrc=x.rc --bazelrc=y.rc --bazelrc=/dev/null --bazelrc=z.rc`, 1) x.rc and y.rc are read. 2) z.rc is ignored due to the prior /dev/null. If unspecified, Bazel uses the first .bazelrc file it finds in the following two locations: the workspace directory, then the user's home directory. Note: command line options will always supersede any option in bazelrc.
--bazelrc=<path>
- Allows multiple
- False
- Documentation category
bazel_client_options
- Option effect tags
changes_inputs
--bep_maximum_open_remote_upload_files
🔗
Use with: build
common
Maximum number of open files allowed during BEP artifact upload.
--bep_maximum_open_remote_upload_files
- Allows multiple
- False
- Documentation category
output_parameters
- Option effect tags
affects_outputs
--bes_backend
🔗
Use with: common
Specifies the build event service (BES) backend endpoint in the form [SCHEME://]HOST[:PORT]. The default is to disable BES uploads. Supported schemes are grpc and grpcs (grpc with TLS enabled). If no scheme is provided, Bazel assumes grpcs.
--bes_backend
- Allows multiple
- False
- Documentation category
logging
- Option effect tags
affects_outputs
--bes_best_effort
🔗
Use with: common
No-op
--[no]bes_best_effort
- Allows multiple
- False
- Deprecation warning
- BES best effort upload has been removed. The flag has no more functionality attached to it and will be removed in a future release.
- Documentation category
undocumented
- Option effect tags
affects_outputs
--bes_check_preceding_lifecycle_events
🔗
Use with: common
Sets the field check_preceding_lifecycle_events_present on PublishBuildToolEventStreamRequest which tells BES to check whether it previously received InvocationAttemptStarted and BuildEnqueued events matching the current tool event.
--[no]bes_check_preceding_lifecycle_events
- Allows multiple
- False
- Documentation category
logging
- Option effect tags
affects_outputs
--bes_header
🔗
Use with: common
Specify a header in NAME=VALUE form that will be included in BES requests. Multiple headers can be passed by specifying the flag multiple times. Multiple values for the same name will be converted to a comma-separated list.
--bes_header
- Allows multiple
- True
- Documentation category
logging
- Option effect tags
affects_outputs
--bes_instance_name
🔗
Use with: common
Specifies the instance name under which the BES will persist uploaded BEP. Defaults to null.
--bes_instance_name
- Old name
--project_id
- Warn old name
- True
- Allows multiple
- False
- Documentation category
logging
- Option effect tags
affects_outputs
--bes_keywords
🔗
Use with: common
Specifies a list of notification keywords to be added the default set of keywords published to BES ("command_name=<command_name> ", "protocol_name=BEP"). Defaults to none.
--bes_keywords
- Allows multiple
- True
- Documentation category
logging
- Option effect tags
affects_outputs
--bes_lifecycle_events
🔗
Use with: common
Specifies whether to publish BES lifecycle events. (defaults to 'true').
--[no]bes_lifecycle_events
- Allows multiple
- False
- Documentation category
logging
- Option effect tags
affects_outputs
--bes_oom_finish_upload_timeout
🔗
Use with: common
Specifies how long bazel should wait for the BES/BEP upload to complete while OOMing. This flag ensures termination when the JVM is severely GC thrashing and cannot make progress on any user thread.
--bes_oom_finish_upload_timeout
- Allows multiple
- False
- Documentation category
logging
- Option effect tags
bazel_monitoring
--bes_outerr_buffer_size
🔗
Use with: common
Specifies the maximal size of stdout or stderr to be buffered in BEP, before it is reported as a progress event. Individual writes are still reported in a single event, even if larger than the specified value up to --bes_outerr_chunk_size.
--bes_outerr_buffer_size
- Allows multiple
- False
- Documentation category
logging
- Option effect tags
affects_outputs
--bes_outerr_chunk_size
🔗
Use with: common
Specifies the maximal size of stdout or stderr to be sent to BEP in a single message.
--bes_outerr_chunk_size
- Allows multiple
- False
- Documentation category
logging
- Option effect tags
affects_outputs
--bes_proxy
🔗
Use with: common
Connect to the Build Event Service through a proxy. Currently this flag can only be used to configure a Unix domain socket (unix:/path/to/socket).
--bes_proxy
- Allows multiple
- False
- Documentation category
logging
- Option effect tags
unknown
--bes_results_url
🔗
Use with: common
Specifies the base URL where a user can view the information streamed to the BES backend. Bazel will output the URL appended by the invocation id to the terminal.
--bes_results_url
- Allows multiple
- False
- Documentation category
logging
- Option effect tags
terminal_output
--bes_system_keywords
🔗
Use with: common
Specifies a list of notification keywords to be included directly, without the "user_keyword=" prefix included for keywords supplied via --bes_keywords. Intended for Build service operators that set --bes_lifecycle_events=false and include keywords when calling PublishLifecycleEvent. Build service operators using this flag should prevent users from overriding the flag value.
--bes_system_keywords
- Allows multiple
- True
- Documentation category
logging
- Option effect tags
affects_outputs
--bes_timeout
🔗
Use with: common
Specifies how long bazel should wait for the BES/BEP upload to complete after the build and tests have finished. A valid timeout is a natural number followed by a unit: Days (d), hours (h), minutes (m), seconds (s), and milliseconds (ms). The default value is '0' which means that there is no timeout.
--bes_timeout
- Allows multiple
- False
- Documentation category
logging
- Option effect tags
affects_outputs
--bes_upload_mode
🔗
Use with: common
Specifies whether the Build Event Service upload should block the build completion or should end the invocation immediately and finish the upload in the background. Either 'wait_for_upload_complete' (default), 'nowait_for_upload_complete', or 'fully_async'.
--bes_upload_mode
- Allows multiple
- False
- Documentation category
logging
- Option effect tags
eagerness_to_exit
--block_for_lock
🔗
Use with: common
startup
When --noblock_for_lock is passed, Bazel does not wait for a running command to complete, but instead exits immediately.
--[no]block_for_lock
- Allows multiple
- False
- Documentation category
bazel_client_options
- Option effect tags
eagerness_to_exit
--break_build_on_parallel_dex2oat_failure
🔗
Use with: configuration
If true dex2oat action failures will cause the build to break instead of executing dex2oat during test runtime.
--[no]break_build_on_parallel_dex2oat_failure
- Allows multiple
- False
- Documentation category
testing
- Option effect tags
loading_and_analysis
- Option metadata tags
experimental
--build
🔗
Use with: build
Execute the build; this is the usual behaviour. Specifying --nobuild causes the build to stop before executing the build actions, returning zero iff the package loading and analysis phases completed successfully; this mode is useful for testing those phases.
--[no]build
- Allows multiple
- False
- Documentation category
output_selection
- Option effect tags
execution
affects_outputs
--build_event_binary_file
🔗
Use with: common
If non-empty, write a varint delimited binary representation of representation of the build event protocol to that file. This option implies --bes_upload_mode=wait_for_upload_complete.
--build_event_binary_file
- Old name
--experimental_build_event_binary_file
- Warn old name
- True
- Allows multiple
- False
- Documentation category
logging
- Option effect tags
affects_outputs
--build_event_binary_file_path_conversion
🔗
Use with: common
Convert paths in the binary file representation of the build event protocol to more globally valid URIs whenever possible; if disabled, the file:// uri scheme will always be used
--[no]build_event_binary_file_path_conversion
- Old name
--[no]experimental_build_event_binary_file_path_conversion
- Warn old name
- True
- Allows multiple
- False
- Documentation category
logging
- Option effect tags
affects_outputs
--build_event_binary_file_upload_mode
🔗
Use with: common
Specifies whether the Build Event Service upload for --build_event_binary_file should block the build completion or should end the invocation immediately and finish the upload in the background. Either 'wait_for_upload_complete' (default), 'nowait_for_upload_complete', or 'fully_async'.
--build_event_binary_file_upload_mode
- Allows multiple
- False
- Documentation category
logging
- Option effect tags
eagerness_to_exit
--build_event_json_file
🔗
Use with: common
If non-empty, write a JSON serialisation of the build event protocol to that file. This option implies --bes_upload_mode=wait_for_upload_complete.
--build_event_json_file
- Old name
--experimental_build_event_json_file
- Warn old name
- True
- Allows multiple
- False
- Documentation category
logging
- Option effect tags
affects_outputs
--build_event_json_file_path_conversion
🔗
Use with: common
Convert paths in the json file representation of the build event protocol to more globally valid URIs whenever possible; if disabled, the file:// uri scheme will always be used
--[no]build_event_json_file_path_conversion
- Old name
--[no]experimental_build_event_json_file_path_conversion
- Warn old name
- True
- Allows multiple
- False
- Documentation category
logging
- Option effect tags
affects_outputs
--build_event_json_file_upload_mode
🔗
Use with: common
Specifies whether the Build Event Service upload for --build_event_json_file should block the build completion or should end the invocation immediately and finish the upload in the background. Either 'wait_for_upload_complete' (default), 'nowait_for_upload_complete', or 'fully_async'.
--build_event_json_file_upload_mode
- Allows multiple
- False
- Documentation category
logging
- Option effect tags
eagerness_to_exit
--build_event_max_named_set_of_file_entries
🔗
Use with: common
The maximum number of entries for a single named_set_of_files event; values smaller than 2 are ignored and no event splitting is performed. This is intended for limiting the maximum event size in the build event protocol, although it does not directly control event size. The total event size is a function of the structure of the set as well as the file and uri lengths, which may in turn depend on the hash function.
--build_event_max_named_set_of_file_entries
- Allows multiple
- False
- Documentation category
logging
- Option effect tags
affects_outputs
--build_event_publish_all_actions
🔗
Use with: common
Whether all actions should be published.
--[no]build_event_publish_all_actions
- Allows multiple
- False
- Documentation category
logging
- Option effect tags
affects_outputs
--build_event_text_file
🔗
Use with: common
If non-empty, write a textual representation of the build event protocol to that file
--build_event_text_file
- Old name
--experimental_build_event_text_file
- Warn old name
- True
- Allows multiple
- False
- Documentation category
logging
- Option effect tags
affects_outputs
--build_event_text_file_path_conversion
🔗
Use with: common
Convert paths in the text file representation of the build event protocol to more globally valid URIs whenever possible; if disabled, the file:// uri scheme will always be used
--[no]build_event_text_file_path_conversion
- Old name
--[no]experimental_build_event_text_file_path_conversion
- Warn old name
- True
- Allows multiple
- False
- Documentation category
logging
- Option effect tags
affects_outputs
--build_event_text_file_upload_mode
🔗
Use with: common
Specifies whether the Build Event Service upload for --build_event_text_file should block the build completion or should end the invocation immediately and finish the upload in the background. Either 'wait_for_upload_complete' (default), 'nowait_for_upload_complete', or 'fully_async'.
--build_event_text_file_upload_mode
- Allows multiple
- False
- Documentation category
logging
- Option effect tags
eagerness_to_exit
--build_event_upload_max_threads
🔗
Use with: build
common
The number of threads used to do build event uploads. Capped at 1000.
--build_event_upload_max_threads
- Allows multiple
- False
- Documentation category
undocumented
- Option effect tags
unknown
--build_manual_tests
🔗
Use with: build
Forces test targets tagged 'manual' to be built. 'manual' tests are excluded from processing. This option forces them to be built (but not executed).
--[no]build_manual_tests
- Allows multiple
- False
- Documentation category
uncategorized
- Option effect tags
unknown
--build_metadata
🔗
Use with: common
Custom key-value string pairs to supply in a build event.
--build_metadata
- Allows multiple
- True
- Documentation category
uncategorized
- Option effect tags
terminal_output
--build_python_zip
🔗
Use with: configuration
Build python executable zip; on on Windows, off on other platforms
--[no]build_python_zip
- Allows multiple
- False
- Documentation category
output_parameters
- Option effect tags
affects_outputs
--build_runfile_links
🔗
Use with: configuration
If true, build runfiles symlink forests for all targets. If false, write them only when required by a local action, test or run command.
--[no]build_runfile_links
- Allows multiple
- False
- Documentation category
output_selection
- Option effect tags
affects_outputs
--build_runfile_manifests
🔗
Use with: configuration
If true, write runfiles manifests for all targets. If false, omit them. Local tests will fail to run when false.
--[no]build_runfile_manifests
- Allows multiple
- False
- Documentation category
output_selection
- Option effect tags
affects_outputs
--build_tag_filters
🔗
Use with: build
Specifies a comma-separated list of tags. Each tag can be optionally preceded with '-' to specify excluded tags. Only those targets will be built that contain at least one included tag and do not contain any excluded tags. This option does not affect the set of tests executed with the 'test' command; those are be governed by the test filtering options, for example '--test_tag_filters'
--build_tag_filters
- Allows multiple
- False
- Documentation category
uncategorized
- Option effect tags
unknown
--build_test_dwp
🔗
Use with: configuration
If enabled, when building C++ tests statically and with fission the .dwp file for the test binary will be automatically built as well.
--[no]build_test_dwp
- Allows multiple
- False
- Documentation category
output_selection
- Option effect tags
loading_and_analysis
affects_outputs
--build_tests_only
🔗
Use with: build
If specified, only *_test and test_suite rules will be built and other targets specified on the command line will be ignored. By default everything that was requested will be built.
--[no]build_tests_only
- Allows multiple
- False
- Documentation category
uncategorized
- Option effect tags
unknown
--bytecode_optimization_pass_actions
🔗
Use with: configuration
Do not use.
--bytecode_optimization_pass_actions
- Allows multiple
- False
- Documentation category
undocumented
- Option effect tags
unknown
--cache_computed_file_digests
🔗
Use with: build
If greater than 0, configures Bazel to cache file digests in memory based on their metadata instead of recomputing the digests from disk every time they are needed. Setting this to 0 ensures correctness because not all file changes can be noted from file metadata. When not 0, the number indicates the size of the cache as the number of file digests to be cached.
--cache_computed_file_digests
- Allows multiple
- False
- Documentation category
undocumented
- Option effect tags
unknown
--cache_test_results
🔗
-t
Use with: configuration
If set to 'auto', Bazel reruns a test if and only if: (1) Bazel detects changes in the test or its dependencies, (2) the test is marked as external, (3) multiple test runs were requested with --runs_per_test, or(4) the test previously failed. If set to 'yes', Bazel caches all test results except for tests marked as external. If set to 'no', Bazel does not cache any test results.
--[no]cache_test_results
- Allows multiple
- False
- Documentation category
uncategorized
- Option effect tags
unknown
--canonicalize_policy
🔗
Use with: canonicalize-flags
Output the canonical policy, after expansion and filtering. To keep the output clean, the canonicalized command arguments will NOT be shown when this option is set to true. Note that the command specified by --for_command affects the filtered policy, and if none is specified, the default command is 'build'.
--[no]canonicalize_policy
- Allows multiple
- False
- Documentation category
output_selection
- Option effect tags
affects_outputs
terminal_output
--catalyst_cpus
🔗
Use with: configuration
Comma-separated list of architectures for which to build Apple Catalyst binaries.
--catalyst_cpus
- Allows multiple
- True
- Documentation category
output_parameters
- Option effect tags
loses_incremental_state
loading_and_analysis
--cc_output_directory_tag
🔗
Use with: configuration
Specifies a suffix to be added to the configuration directory.
--cc_output_directory_tag
- Allows multiple
- False
- Documentation category
toolchain
- Option effect tags
affects_outputs
--cc_proto_library_header_suffixes
🔗
Use with: configuration
Sets the suffixes of header files that a cc_proto_library creates.
--cc_proto_library_header_suffixes
- Allows multiple
- False
- Documentation category
output_selection
- Option effect tags
affects_outputs
loading_and_analysis
--cc_proto_library_source_suffixes
🔗
Use with: configuration
Sets the suffixes of source files that a cc_proto_library creates.
--cc_proto_library_source_suffixes
- Allows multiple
- False
- Documentation category
output_selection
- Option effect tags
affects_outputs
loading_and_analysis
--charset
🔗
Use with: mod
Chooses the character set to use for the tree. Only affects text output. Valid values are "utf8" or "ascii". Default is "utf8"
--charset
- Allows multiple
- False
- Documentation category
mod_command
- Option effect tags
terminal_output
--check_bazel_compatibility
🔗
Use with: common
Check bazel version compatibility of Bazel modules. Valid values are `error` to escalate it to a resolution failure, `off` to disable the check, or `warning` to print a warning when mismatch detected.
--check_bazel_compatibility
- Allows multiple
- False
- Documentation category
bzlmod
- Option effect tags
loading_and_analysis
--check_bzl_visibility
🔗
Use with: common
If disabled, .bzl load visibility errors are demoted to warnings.
--[no]check_bzl_visibility
- Allows multiple
- False
- Documentation category
input_strictness
- Option effect tags
build_file_semantics
--check_direct_dependencies
🔗
Use with: common
Check if the direct `bazel_dep` dependencies declared in the root module are the same versions you get in the resolved dependency graph. Valid values are `off` to disable the check, `warning` to print a warning when mismatch detected or `error` to escalate it to a resolution failure.
--check_direct_dependencies
- Allows multiple
- False
- Documentation category
bzlmod
- Option effect tags
loading_and_analysis
--check_fileset_dependencies_recursively
🔗
Use with: build
--[no]check_fileset_dependencies_recursively
- Allows multiple
- False
- Deprecation warning
- This flag is a no-op and fileset dependencies are always checked to ensure correctness of builds.
- Documentation category
undocumented
- Option effect tags
affects_outputs
--check_licenses
🔗
Use with: configuration
Check that licensing constraints imposed by dependent packages do not conflict with distribution modes of the targets being built. By default, licenses are not checked.
--[no]check_licenses
- Allows multiple
- False
- Documentation category
input_strictness
- Option effect tags
build_file_semantics
--check_tests_up_to_date
🔗
Use with: build
Don't run tests, just check if they are up-to-date. If all tests results are up-to-date, the testing completes successfully. If any test needs to be built or executed, an error is reported and the testing fails. This option implies --check_up_to_date behavior.
--[no]check_tests_up_to_date
- Allows multiple
- False
- Documentation category
testing
- Implicit requirements
--check_up_to_date
- Option effect tags
execution
--check_up_to_date
🔗
Use with: build
Don't perform the build, just check if it is up-to-date. If all targets are up-to-date, the build completes successfully. If any step needs to be executed an error is reported and the build fails.
--[no]check_up_to_date
- Allows multiple
- False
- Documentation category
execution_strategy
- Option effect tags
execution
--check_visibility
🔗
Use with: configuration
If disabled, visibility errors in target dependencies are demoted to warnings.
--[no]check_visibility
- Allows multiple
- False
- Documentation category
input_strictness
- Option effect tags
build_file_semantics
--client_debug
🔗
Use with: startup
If true, log debug information from the client to stderr. Changing this option will not cause the server to restart.
--[no]client_debug
- Allows multiple
- False
- Documentation category
bazel_client_options
- Option effect tags
affects_outputs
bazel_monitoring
--collapse_duplicate_defines
🔗
Use with: build
no-op
--[no]collapse_duplicate_defines
- Allows multiple
- False
- Documentation category
undocumented
- Option effect tags
loading_and_analysis
loses_incremental_state
--collect_code_coverage
🔗
Use with: configuration
If specified, Bazel will instrument code (using offline instrumentation where possible) and will collect coverage information during tests. Only targets that match --instrumentation_filter will be affected. Usually this option should not be specified directly - 'bazel coverage' command should be used instead.
--[no]collect_code_coverage
- Allows multiple
- False
- Documentation category
output_parameters
- Option effect tags
affects_outputs
--color
🔗
Use with: common
Use terminal controls to colorize output.
--color
- Allows multiple
- False
- Documentation category
uncategorized
- Option effect tags
unknown
--combined_report
🔗
Use with: build
Specifies desired cumulative coverage report type. At this point only LCOV is supported.
--combined_report
- Allows multiple
- False
- Documentation category
uncategorized
- Option effect tags
unknown
--command_port
🔗
Use with: startup
Port to start up the gRPC command server on. If 0, let the kernel choose.
--command_port
- Allows multiple
- False
- Documentation category
undocumented
- Option effect tags
loses_incremental_state
bazel_internal_configuration
--compilation_mode
🔗
-c
Use with: configuration
Specify the mode the binary will be built in. Values: 'fastbuild', 'dbg', 'opt'.
--compilation_mode
- Allows multiple
- False
- Documentation category
output_parameters
- Option effect tags
affects_outputs
action_command_lines
--compile_one_dependency
🔗
Use with: build
Compile a single dependency of the argument files. This is useful for syntax checking source files in IDEs, for example, by rebuilding a single target that depends on the source file to detect errors as early as possible in the edit/build/test cycle. This argument affects the way all non-flag arguments are interpreted; instead of being targets to build they are source filenames. For each source filename an arbitrary target that depends on it will be built.
--[no]compile_one_dependency
- Allows multiple
- False
- Documentation category
uncategorized
- Option effect tags
unknown
--compiler
🔗
Use with: configuration
The C++ compiler to use for compiling the target.
--compiler
- Allows multiple
- False
- Documentation category
toolchain
- Option effect tags
loading_and_analysis
execution
--config
🔗
Use with: common
Selects additional config sections from the rc files; for every <command>, it also pulls in the options from <command>:<config> if such a section exists; if this section doesn't exist in any .rc file, Blaze fails with an error. The config sections and flag combinations they are equivalent to are located in the tools/*.blazerc config files.
--config
- Allows multiple
- True
- Documentation category
uncategorized
- Option effect tags
unknown
--configure
🔗
Use with: fetch
sync
Only fetches repositories marked as 'configure' for system-configuration purpose. Only works when --enable_bzlmod is on.
--[no]configure
- Allows multiple
- False
- Documentation category
execution_strategy
- Option effect tags
changes_inputs
--conlyopt
🔗
Use with: configuration
Additional option to pass to gcc when compiling C source files.
--conlyopt
- Allows multiple
- True
- Documentation category
output_parameters
- Option effect tags
action_command_lines
affects_outputs
--connect_timeout_secs
🔗
Use with: startup
The amount of time the client waits for each attempt to connect to the server
--connect_timeout_secs
- Allows multiple
- False
- Documentation category
bazel_client_options
- Option effect tags
bazel_internal_configuration
--consistent_labels
🔗
Use with: aquery
cquery
query
If enabled, every query command emits labels as if by the Starlark <code>str</code> function applied to a <code>Label</code> instance. This is useful for tools that need to match the output of different query commands and/or labels emitted by rules. If not enabled, output formatters are free to emit apparent repository names (relative to the main repository) instead to make the output more readable.
--[no]consistent_labels
- Allows multiple
- False
- Documentation category
query
- Option effect tags
terminal_output
--copt
🔗
Use with: configuration
Additional options to pass to gcc.
--copt
- Allows multiple
- True
- Documentation category
output_parameters
- Option effect tags
action_command_lines
affects_outputs
--coverage_output_generator
🔗
Use with: configuration
Location of the binary that is used to postprocess raw coverage reports. This must currently be a filegroup that contains a single file, the binary. Defaults to '//tools/test:lcov_merger'.
--coverage_output_generator
- Allows multiple
- False
- Documentation category
toolchain
- Option effect tags
changes_inputs
affects_outputs
loading_and_analysis
--coverage_report_generator
🔗
Use with: configuration
Location of the binary that is used to generate coverage reports. This must currently be a filegroup that contains a single file, the binary. Defaults to '//tools/test:coverage_report_generator'.
--coverage_report_generator
- Allows multiple
- False
- Documentation category
toolchain
- Option effect tags
changes_inputs
affects_outputs
loading_and_analysis
--coverage_support
🔗
Use with: configuration
Location of support files that are required on the inputs of every test action that collects code coverage. Defaults to '//tools/test:coverage_support'.
--coverage_support
- Allows multiple
- False
- Documentation category
toolchain
- Option effect tags
changes_inputs
affects_outputs
loading_and_analysis
--cpu
🔗
Use with: configuration
The target CPU.
--cpu
- Allows multiple
- False
- Documentation category
output_parameters
- Option effect tags
changes_inputs
affects_outputs
--credential_helper
🔗
Use with: common
Configures a credential helper to use for retrieving authorization credentials for repository fetching, remote caching and execution, and the build event service. Credentials supplied by a helper take precedence over credentials supplied by --google_default_credentials, --google_credentials, a .netrc file, or the auth parameter to repository_ctx.download and repository_ctx.download_and_extract. May be specified multiple times to set up multiple helpers. See https://github.com/bazelbuild/proposals/blob/main/designs/2022-06-07-bazel-credential-helpers.md for details.
--credential_helper
- Old name
--experimental_credential_helper
- Warn old name
- True
- Allows multiple
- True
- Documentation category
uncategorized
- Option effect tags
unknown
--credential_helper_cache_duration
🔗
Use with: common
The duration for which credentials supplied by a credential helper are cached. Invoking with a different value will adjust the lifetime of preexisting entries; pass zero to clear the cache. A clean command always clears the cache, regardless of this flag.
--credential_helper_cache_duration
- Old name
--experimental_credential_helper_cache_duration
- Warn old name
- True
- Allows multiple
- False
- Documentation category
uncategorized
- Option effect tags
unknown
--credential_helper_timeout
🔗
Use with: common
Configures the timeout for a credential helper. Credential helpers failing to respond within this timeout will fail the invocation.
--credential_helper_timeout
- Old name
--experimental_credential_helper_timeout
- Warn old name
- True
- Allows multiple
- False
- Documentation category
uncategorized
- Option effect tags
unknown
--crosstool_top
🔗
Use with: configuration
The label of the crosstool package to be used for compiling C++ code.
--crosstool_top
- Allows multiple
- False
- Documentation category
toolchain
- Option effect tags
loading_and_analysis
changes_inputs
affects_outputs
--cs_fdo_absolute_path
🔗
Use with: configuration
Use CSFDO profile information to optimize compilation. Specify the absolute path name of the zip file containing the profile file, a raw or an indexed LLVM profile file.
--cs_fdo_absolute_path
- Allows multiple
- False
- Documentation category
output_parameters
- Option effect tags
affects_outputs
--cs_fdo_instrument
🔗
Use with: configuration
Generate binaries with context sensitive FDO instrumentation. With Clang/LLVM compiler, it also accepts the directory name under which the raw profile file(s) will be dumped at runtime.
--cs_fdo_instrument
- Allows multiple
- False
- Documentation category
output_parameters
- Implicit requirements
--copt=-Wno-error
- Option effect tags
affects_outputs
--cs_fdo_profile
🔗
Use with: configuration
The cs_fdo_profile representing the context sensitive profile to be used for optimization.
--cs_fdo_profile
- Allows multiple
- False
- Documentation category
output_parameters
- Option effect tags
affects_outputs
--curses
🔗
Use with: common
Use terminal cursor controls to minimize scrolling output.
--curses
- Allows multiple
- False
- Documentation category
uncategorized
- Option effect tags
unknown
--custom_malloc
🔗
Use with: configuration
Specifies a custom malloc implementation. This setting overrides malloc attributes in build rules.
--custom_malloc
- Allows multiple
- False
- Documentation category
toolchain
- Option effect tags
changes_inputs
affects_outputs
--cxxopt
🔗
Use with: configuration
Additional option to pass to gcc when compiling C++ source files.
--cxxopt
- Allows multiple
- True
- Documentation category
output_parameters
- Option effect tags
action_command_lines
affects_outputs
--cycles
🔗
Use with: mod
Points out dependency cycles inside the displayed tree, which are normally ignored by default.
--[no]cycles
- Allows multiple
- False
- Documentation category
mod_command
- Option effect tags
terminal_output
--debug_app
🔗
Use with: mobile-install
Whether to wait for the debugger before starting the app.
--debug_app
- Allows multiple
- False
- Documentation category
output_parameters
- Expands to
--start=DEBUG
- Option effect tags
execution
--debug_spawn_scheduler
🔗
Use with: build
--[no]debug_spawn_scheduler
- Old name
--[no]experimental_debug_spawn_scheduler
- Warn old name
- False
- Allows multiple
- False
- Documentation category
logging
- Option effect tags
unknown
--default_visibility
🔗
Use with: build
canonicalize-flags
fetch
mod
query
sync
Default visibility for packages that don't set it explicitly ('public' or 'private').
--default_visibility
- Allows multiple
- False
- Documentation category
undocumented
- Option effect tags
unknown
--defer_param_files
🔗
Use with: build
This option is deprecated and has no effect and will be removed in the future.
--[no]defer_param_files
- Allows multiple
- False
- Documentation category
undocumented
- Option effect tags
loading_and_analysis
execution
action_command_lines
--define
🔗
Use with: configuration
Each --define option specifies an assignment for a build variable.
--define
- Allows multiple
- True
- Documentation category
output_parameters
- Option effect tags
changes_inputs
affects_outputs
--deleted_packages
🔗
Use with: build
canonicalize-flags
fetch
mod
query
sync
A comma-separated list of names of packages which the build system will consider non-existent, even if they are visible somewhere on the package path. Use this option when deleting a subpackage 'x/y' of an existing package 'x'. For example, after deleting x/y/BUILD in your client, the build system may complain if it encounters a label '//x:y/z' if that is still provided by another package_path entry. Specifying --deleted_packages x/y avoids this problem.
--deleted_packages
- Allows multiple
- True
- Documentation category
uncategorized
- Option effect tags
unknown
--depth
🔗
Use with: mod
Maximum display depth of the dependency tree. A depth of 1 displays the direct dependencies, for example. For tree, path and all_paths it defaults to Integer.MAX_VALUE, while for deps and explain it defaults to 1 (only displays direct deps of the root besides the target leaves and their parents).
--depth
- Allows multiple
- False
- Documentation category
mod_command
- Option effect tags
terminal_output
--desugar_for_android
🔗
Use with: configuration
Whether to desugar Java 8 bytecode before dexing.
--[no]desugar_for_android
- Old name
--[no]experimental_desugar_for_android
- Warn old name
- True
- Allows multiple
- False
- Documentation category
input_strictness
- Option effect tags
affects_outputs
loading_and_analysis
loses_incremental_state
--desugar_java8_libs
🔗
Use with: configuration
Whether to include supported Java 8 libraries in apps for legacy devices.
--[no]desugar_java8_libs
- Old name
--[no]experimental_desugar_java8_libs
- Warn old name
- False
- Allows multiple
- False
- Documentation category
input_strictness
- Option effect tags
affects_outputs
loading_and_analysis
loses_incremental_state
- Option metadata tags
experimental
--device
🔗
Use with: mobile-install
The adb device serial number. If not specified, the first device will be used.
--device
- Allows multiple
- False
- Documentation category
output_parameters
- Option effect tags
action_command_lines
--device_debug_entitlements
🔗
Use with: configuration
If set, and compilation mode is not 'opt', objc apps will include debug entitlements when signing.
--[no]device_debug_entitlements
- Allows multiple
- False
- Documentation category
signing
- Option effect tags
changes_inputs
--dexopts_supported_in_dexmerger
🔗
Use with: configuration
dx flags supported in tool that merges dex archives into final classes.dex files.
--dexopts_supported_in_dexmerger
- Allows multiple
- False
- Documentation category
undocumented
- Option effect tags
action_command_lines
loading_and_analysis
--dexopts_supported_in_dexsharder
🔗
Use with: configuration
dx flags supported in tool that groups classes for inclusion in final .dex files.
--dexopts_supported_in_dexsharder
- Allows multiple
- False
- Documentation category
undocumented
- Option effect tags
action_command_lines
loading_and_analysis
--dexopts_supported_in_incremental_dexing
🔗
Use with: configuration
dx flags supported when converting Jars to dex archives incrementally.
--dexopts_supported_in_incremental_dexing
- Allows multiple
- False
- Documentation category
undocumented
- Option effect tags
action_command_lines
loading_and_analysis
--digest_function
🔗
Use with: startup
The hash function to use when computing file digests.
--digest_function
- Allows multiple
- False
- Documentation category
undocumented
- Option effect tags
loses_incremental_state
bazel_internal_configuration
- Option metadata tags
experimental
--direct_run
🔗
Use with: build
Deprecated no-op.
--[no]direct_run
- Allows multiple
- False
- Documentation category
undocumented
- Option effect tags
unknown
- Option metadata tags
deprecated
--directory_creation_cache
🔗
Use with: build
Describes the cache used to store known regular directories as they're created. Parent directories of output files are created on-demand during action execution.
--directory_creation_cache
- Allows multiple
- False
- Documentation category
undocumented
- Option effect tags
execution
--disallow_strict_deps_for_jpl
🔗
Use with: configuration
If set, any java_proto_library or java_mutable_proto_library which sets the strict_deps attribute explicitly will fail to build.
--[no]disallow_strict_deps_for_jpl
- Allows multiple
- False
- Documentation category
undocumented
- Option effect tags
build_file_semantics
eagerness_to_exit
--discard_actions_after_execution
🔗
Use with: build
This option is deprecated and has no effect.
--[no]discard_actions_after_execution
- Allows multiple
- False
- Documentation category
undocumented
- Option effect tags
loses_incremental_state
- Option metadata tags
incompatible_change
--discard_analysis_cache
🔗
Use with: build
Discard the analysis cache immediately after the analysis phase completes. Reduces memory usage by ~10%, but makes further incremental builds slower.
--[no]discard_analysis_cache
- Allows multiple
- False
- Documentation category
uncategorized
- Option effect tags
unknown
--disk_cache
🔗
Use with: build
common
A path to a directory where Bazel can read and write actions and action outputs. If the directory does not exist, it will be created.
--disk_cache
- Allows multiple
- False
- Documentation category
uncategorized
- Option effect tags
unknown