CLI Reference for Bazel v8.0.0-pre.20240108.6

Return to release home

Commands

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

focus

EXPERIMENTAL. Reduce memory usage with working sets.

bazel focus

Option inheritance
None
Hidden
True
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



Scopes:

--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_configurationhost_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

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_stateloading_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_outputsbazel_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_analysisaffects_outputs

--android_compiler 🔗

Use with: configuration

The Android target compiler.

--android_compiler

Allows multiple
False
Documentation category
toolchain
Option effect tags
affects_outputsloading_and_analysisloses_incremental_state

--android_cpu 🔗

Use with: configuration

The Android target CPU.

--android_cpu

Allows multiple
False
Documentation category
output_parameters
Option effect tags
affects_outputsloading_and_analysisloses_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_outputschanges_inputsloading_and_analysisloses_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_outputsloading_and_analysisloses_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_outputsloading_and_analysisloses_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_outputsloading_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_inputsloading_and_analysisloses_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_outputsloading_and_analysisloses_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_linesexecution

--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_inputsloading_and_analysisloses_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_outputsloading_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_inputsloading_and_analysisloses_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_linesaffects_outputsloading_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_statechanges_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_outputsaction_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_stateloading_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_analysisexecution

--aspect_deps 🔗

Use with: aquerycqueryquery

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_inputsloading_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_outputsloses_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_statebazel_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: buildcommon

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: commonstartup

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
executionaffects_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: buildcommon

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

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_analysisaffects_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_outputsterminal_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_stateloading_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_outputsloading_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_outputsloading_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_outputsbazel_monitoring

--collapse_duplicate_defines 🔗

Use with: build

no-op

--[no]collapse_duplicate_defines

Allows multiple
False
Documentation category
undocumented
Option effect tags
loading_and_analysisloses_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_statebazel_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_outputsaction_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_analysisexecution

--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: fetchsync

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_linesaffects_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: aquerycqueryquery

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_linesaffects_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_inputsaffects_outputsloading_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_inputsaffects_outputsloading_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_inputsaffects_outputsloading_and_analysis

--cpu 🔗

Use with: configuration

The target CPU.

--cpu

Allows multiple
False
Documentation category
output_parameters
Option effect tags
changes_inputsaffects_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

No-op flag. Will be removed in a future release.

--crosstool_top

Allows multiple
False
Documentation category
undocumented
Option effect tags
no_op

--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_inputsaffects_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_linesaffects_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: buildcanonicalize-flagsfetchmodquerysync

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_analysisexecutionaction_command_lines

--define 🔗

Use with: configuration

Each --define option specifies an assignment for a build variable. In case of multiple values for a variable, the last one wins.

--define

Allows multiple
True
Documentation category
output_parameters
Option effect tags
changes_inputsaffects_outputs

--deleted_packages 🔗

Use with: buildcanonicalize-flagsfetchmodquerysync

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_outputsloading_and_analysisloses_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_outputsloading_and_analysisloses_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_linesloading_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_linesloading_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_linesloading_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_statebazel_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_semanticseagerness_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: buildcommon

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

--distdir 🔗

Use with: common

Additional places to search for archives before accessing the network to download them.

--distdir

Old name
--experimental_distdir
Warn old name
True
Allows multiple
True
Documentation category
bazel_client_options
Option effect tags
bazel_internal_configuration

--dump 🔗
-d

Use with: analyze-profile

output full profile data dump either in human-readable 'text' format or script-friendly 'raw' format.

--dump

Allows multiple
False
Documentation category
logging
Option effect tags
bazel_monitoring

--dump_all 🔗

Use with: config

If set, dump all known configurations instead of just the ids.

--[no]dump_all

Allows multiple
False
Documentation category
output_parameters
Option effect tags
affects_outputs

--dump_keys 🔗

Use with: focus

Dump the focused SkyKeys.

--[no]dump_keys

Allows multiple
False
Documentation category
undocumented
Option effect tags
terminal_output

--dynamic_local_execution_delay 🔗

Use with: build

How many milliseconds should local execution be delayed, if remote execution was faster during a build at least once?

--dynamic_local_execution_delay

Old name
--experimental_local_execution_delay
Warn old name
False
Allows multiple
False
Documentation category
execution_strategy
Option effect tags
executionhost_machine_resource_optimizations

--dynamic_local_strategy 🔗

Use with: build

The local strategies, in order, to use for the given mnemonic - the first applicable strategy is used. For example, `worker,sandboxed` runs actions that support persistent workers using the worker strategy, and all others using the sandboxed strategy. If no mnemonic is given, the list of strategies is used as the fallback for all mnemonics. The default fallback list is `worker,sandboxed`, or`worker,sandboxed,standalone` if `experimental_local_lockfree_output` is set. Takes [mnemonic=]local_strategy[,local_strategy,...]

--dynamic_local_strategy

Allows multiple
True
Documentation category
execution_strategy
Option effect tags
executionhost_machine_resource_optimizations

--dynamic_mode 🔗

Use with: configuration

Determines whether C++ binaries will be linked dynamically. '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.

--dynamic_mode

Allows multiple
False
Documentation category
output_parameters
Option effect tags
loading_and_analysisaffects_outputs

--dynamic_remote_strategy 🔗

Use with: build

The remote strategies, in order, to use for the given mnemonic - the first applicable strategy is used. If no mnemonic is given, the list of strategies is used as the fallback for all mnemonics. The default fallback list is `remote`, so this flag usually does not need to be set explicitly. Takes [mnemonic=]remote_strategy[,remote_strategy,...]

--dynamic_remote_strategy

Allows multiple
True
Documentation category
execution_strategy
Option effect tags
executionhost_machine_resource_optimizations

--emacs 🔗

Use with: common

A system-generated parameter which is true iff EMACS=t or INSIDE_EMACS is set in the environment of the client. This option controls certain display features.

--[no]emacs

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown

--embed_label 🔗

Use with: build

Embed source control revision or release label in binary

--embed_label

Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown

--enable_bzlmod 🔗

Use with: common

If true, enables the Bzlmod dependency management system, taking precedence over WORKSPACE. See https://bazel.build/docs/bzlmod for more information.

--[no]enable_bzlmod

Old name
--[no]experimental_enable_bzlmod
Warn old name
True
Allows multiple
False
Documentation category
starlark_semantics
Option effect tags
loading_and_analysis

--enable_fdo_profile_absolute_path 🔗

Use with: configuration

If set, use of fdo_absolute_profile_path will raise an error.

--[no]enable_fdo_profile_absolute_path

Allows multiple
False
Documentation category
output_parameters
Option effect tags
affects_outputs

--enable_platform_specific_config 🔗

Use with: common

If true, Bazel picks up host-OS-specific config lines from bazelrc files. For example, if the host OS is Linux and you run bazel build, Bazel picks up lines starting with build:linux. Supported OS identifiers are linux, macos, windows, freebsd, and openbsd. Enabling this flag is equivalent to using --config=linux on Linux, --config=windows on Windows, etc.

--[no]enable_platform_specific_config

Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown

--enable_runfiles 🔗

Use with: configuration

Enable runfiles symlink tree; By default, it's off on Windows, on on other platforms.

--[no]enable_runfiles

Allows multiple
False
Documentation category
output_parameters
Option effect tags
affects_outputs

--enable_workspace 🔗

Use with: common

If true, enables the legacy WORKSPACE system for external dependencies. See https://bazel.build/external/overview for more information.

--[no]enable_workspace

Allows multiple
False
Documentation category
starlark_semantics
Option effect tags
loading_and_analysis

--enforce_constraints 🔗

Use with: configuration

Checks the environments each target is compatible with and reports errors if any target has dependencies that don't support the same environments

--[no]enforce_constraints

Old name
--[no]experimental_enforce_constraints
Warn old name
True
Allows multiple
False
Documentation category
input_strictness
Option effect tags
build_file_semantics

--enforce_proguard_file_extension 🔗

Use with: configuration

If enabled, requires that ProGuard configuration files outside of third_party/ use the *.pgcfg file extension.

--[no]enforce_proguard_file_extension

Allows multiple
False
Documentation category
undocumented
Option effect tags
eagerness_to_exit

--enforce_transitive_configs_for_config_feature_flag 🔗

Use with: configuration

--[no]enforce_transitive_configs_for_config_feature_flag

Allows multiple
False
Documentation category
undocumented
Option effect tags
loses_incremental_stateaffects_outputsbuild_file_semanticsbazel_internal_configurationloading_and_analysis

--execution_log_binary_file 🔗

Use with: build

Log the executed spawns into this file as length-delimited SpawnExec protos, according to src/main/protobuf/spawn.proto. Related flags: --execution_log_json_file (text JSON format; mutually exclusive), --execution_log_sort (whether to sort the execution log), --subcommands (for displaying subcommands in terminal output).

--execution_log_binary_file

Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown

--execution_log_json_file 🔗

Use with: build

Log the executed spawns into this file as newline-delimited JSON representations of SpawnExec protos, according to src/main/protobuf/spawn.proto. Related flags: --execution_log_binary_file (binary protobuf format; mutually exclusive), --execution_log_sort (whether to sort the execution log), --subcommands (for displaying subcommands in terminal output).

--execution_log_json_file

Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown

--execution_log_sort 🔗

Use with: build

Whether to sort the execution log, making it easier to compare logs across invocations. Set to false to avoid potentially significant CPU and memory usage at the end of the invocation, at the cost of producing the log in nondeterministic execution order. Only applies to the binary and JSON formats; the compact format is never sorted.

--[no]execution_log_sort

Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown

--expand_configs_in_place 🔗

Use with: startup

Changed the expansion of --config flags to be done in-place, as opposed to in a fixed point expansion between normal rc options and command-line specified options.

--[no]expand_configs_in_place

Allows multiple
False
Deprecation warning
This option is now a no-op and will soon be deleted.
Documentation category
bazel_client_options
Option effect tags
no_op
Option metadata tags
deprecated

--expand_test_suites 🔗

Use with: build

Expand test_suite targets into their constituent tests before analysis. When this flag is turned on (the default), negative target patterns will apply to the tests belonging to the test suite, otherwise they will not. Turning off this flag is useful when top-level aspects are applied at command line: then they can analyze test_suite targets.

--[no]expand_test_suites

Allows multiple
False
Documentation category
uncategorized
Option effect tags
loading_and_analysis

--experimental_action_listener 🔗

Use with: configuration

Deprecated in favor of aspects. Use action_listener to attach an extra_action to existing build actions.

--experimental_action_listener

Allows multiple
True
Documentation category
output_parameters
Option effect tags
execution
Option metadata tags
experimental

--experimental_action_resource_set 🔗

Use with: common

If set to true, ctx.actions.run() and ctx.actions.run_shell() accept a resource_set parameter for local execution. Otherwise it will default to 250 MB for memory and 1 cpu.

--[no]experimental_action_resource_set

Allows multiple
False
Documentation category
starlark_semantics
Option effect tags
executionbuild_file_semantics
Option metadata tags
experimental

--experimental_add_exec_constraints_to_targets 🔗

Use with: configuration

List of comma-separated regular expressions, each optionally prefixed by - (negative expression), assigned (=) to a list of comma-separated constraint value targets. If a target matches no negative expression and at least one positive expression its toolchain resolution will be performed as if it had declared the constraint values as execution constraints. Example: //demo,-test=@platforms//cpus:x86_64 will add 'x86_64' to any target under //demo except for those whose name contains 'test'.

--experimental_add_exec_constraints_to_targets

Allows multiple
True
Documentation category
toolchain
Option effect tags
loading_and_analysis

--experimental_add_test_support_to_compile_time_deps 🔗

Use with: configuration

Flag to help transition away from adding test support libraries to the compile-time deps of Java test rules.

--[no]experimental_add_test_support_to_compile_time_deps

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown

--experimental_allow_android_library_deps_without_srcs 🔗

Use with: configuration

No-op. Kept here for backwards compatibility.

--[no]experimental_allow_android_library_deps_without_srcs

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown

Use with: configuration

Flag to help transition from allowing to disallowing runtime_deps on neverlink Java archives. The depot needs to be cleaned up to roll this out by default.

--[no]experimental_allow_runtime_deps_on_neverlink

Allows multiple
False
Documentation category
undocumented
Option effect tags
build_file_semantics
Option metadata tags
experimental

--experimental_always_filter_duplicate_classes_from_android_test 🔗

Use with: configuration

If enabled and the android_test defines a binary_under_test, the class filterering applied to the test's deploy jar will always filter duplicate classes based solely on matching class and package name, ignoring hash values.

--[no]experimental_always_filter_duplicate_classes_from_android_test

Allows multiple
False
Documentation category
undocumented
Option effect tags
changes_inputs

--experimental_android_assume_minsdkversion 🔗

Use with: configuration

When enabled, the minSdkVersion is parsed from the merged AndroidManifest and used to instruct Proguard on valid Android build versions.

--[no]experimental_android_assume_minsdkversion

Allows multiple
False
Documentation category
undocumented
Option effect tags
action_command_linesloading_and_analysis
Option metadata tags
experimental

--experimental_android_compress_java_resources 🔗

Use with: configuration

Compress Java resources in APKs

--[no]experimental_android_compress_java_resources

Allows multiple
False
Documentation category
output_parameters
Option effect tags
affects_outputsloading_and_analysis
Option metadata tags
experimental

--experimental_android_databinding_v2 🔗

Use with: configuration

Use android databinding v2. This flag is a no-op.

--[no]experimental_android_databinding_v2

Allows multiple
False
Documentation category
output_parameters
Option effect tags
affects_outputsloading_and_analysisloses_incremental_state
Option metadata tags
experimental

--experimental_android_library_exports_manifest_default 🔗

Use with: configuration

The default value of the exports_manifest attribute on android_library.

--[no]experimental_android_library_exports_manifest_default

Allows multiple
False
Documentation category
undocumented
Option effect tags
affects_outputsloading_and_analysisloses_incremental_state

--experimental_android_resource_cycle_shrinking 🔗

Use with: configuration

Enables more shrinking of code and resources by instructing AAPT2 to emit conditional Proguard keep rules.

--[no]experimental_android_resource_cycle_shrinking

Allows multiple
False
Documentation category
undocumented
Option effect tags
affects_outputsloading_and_analysis
Option metadata tags
experimental

--experimental_android_resource_name_obfuscation 🔗

Use with: configuration

Enables obfuscation of resource names within android_binary APKs.

--[no]experimental_android_resource_name_obfuscation

Allows multiple
False
Documentation category
undocumented
Option effect tags
affects_outputsloading_and_analysis
Option metadata tags
experimental

--experimental_android_resource_path_shortening 🔗

Use with: configuration

Enables shortening of resource file paths within android_binary APKs.

--[no]experimental_android_resource_path_shortening

Allows multiple
False
Documentation category
undocumented
Option effect tags
affects_outputsloading_and_analysis
Option metadata tags
experimental

--experimental_android_resource_shrinking 🔗

Use with: configuration

Enables resource shrinking for android_binary APKs that use ProGuard.

--[no]experimental_android_resource_shrinking

Allows multiple
False
Documentation category
output_parameters
Option effect tags
affects_outputsloading_and_analysis

--experimental_android_rewrite_dexes_with_rex 🔗

Use with: configuration

use rex tool to rewrite dex files

--[no]experimental_android_rewrite_dexes_with_rex

Allows multiple
False
Documentation category
output_parameters
Option effect tags
affects_outputsloading_and_analysisloses_incremental_state
Option metadata tags
experimental

--experimental_android_use_parallel_dex2oat 🔗

Use with: configuration

Use dex2oat in parallel to possibly speed up android_test.

--[no]experimental_android_use_parallel_dex2oat

Allows multiple
False
Documentation category
testing
Option effect tags
loading_and_analysishost_machine_resource_optimizations
Option metadata tags
experimental

--experimental_announce_profile_path 🔗

Use with: common

If enabled, adds the JSON profile path to the log.

--[no]experimental_announce_profile_path

Allows multiple
False
Documentation category
logging
Option effect tags
bazel_monitoring

--experimental_aquery_dump_after_build_format 🔗

Use with: build

Writes the state of Skyframe (which includes previous invocations on this blaze instance as well) to stdout after a build, in the same format as aquery's. Possible formats: proto|textproto|jsonproto.

--experimental_aquery_dump_after_build_format

Allows multiple
False
Documentation category
undocumented
Option effect tags
affects_outputs

--experimental_aquery_dump_after_build_output_file 🔗

Use with: build

Specify the output file for the aquery dump after a build. Use in conjunction with --experimental_aquery_dump_after_build_format. The path provided is relative to Bazel's output base, unless it's an absolute path.

--experimental_aquery_dump_after_build_output_file

Allows multiple
False
Documentation category
undocumented
Option effect tags
affects_outputs

--experimental_bep_target_summary 🔗

Use with: buildcommon

Whether to publish TargetSummary events.

--[no]experimental_bep_target_summary

Allows multiple
False
Documentation category
logging
Option effect tags
unknown

--experimental_build_event_expand_filesets 🔗

Use with: buildcommon

If true, expand Filesets in the BEP when presenting output files.

--[no]experimental_build_event_expand_filesets

Allows multiple
False
Documentation category
logging
Option effect tags
affects_outputs

Use with: buildcommon

If true, fully resolve relative Fileset symlinks in the BEP when presenting output files. Requires --experimental_build_event_expand_filesets.

--[no]experimental_build_event_fully_resolve_fileset_symlinks

Allows multiple
False
Documentation category
logging
Option effect tags
affects_outputs

--experimental_build_event_upload_max_retries 🔗

Use with: buildcommon

The maximum number of times Bazel should retry uploading a build event.

--experimental_build_event_upload_max_retries

Allows multiple
False
Documentation category
logging
Option effect tags
bazel_internal_configuration

--experimental_build_event_upload_retry_minimum_delay 🔗

Use with: buildcommon

Initial, minimum delay for exponential backoff retries when BEP upload fails. (exponent: 1.6)

--experimental_build_event_upload_retry_minimum_delay

Allows multiple
False
Documentation category
logging
Option effect tags
bazel_internal_configuration

--experimental_build_event_upload_strategy 🔗

Use with: buildcommon

Selects how to upload artifacts referenced in the build event protocol.

--experimental_build_event_upload_strategy

Allows multiple
False
Documentation category
logging
Option effect tags
affects_outputs

--experimental_build_transitive_python_runfiles 🔗

Use with: build

No-op

--[no]experimental_build_transitive_python_runfiles

Old name
--[no]incompatible_build_transitive_python_runfiles
Warn old name
True
Allows multiple
False
Documentation category
undocumented
Option effect tags
no_op

--experimental_builtins_bzl_path 🔗

Use with: common

This flag tells Bazel how to find the "@_builtins" .bzl files that govern how predeclared symbols for BUILD and .bzl files are defined. This flag is only intended for Bazel developers, to help when writing @_builtins .bzl code. Ordinarily this value is set to "%bundled%", which means to use the builtins_bzl/ directory packaged in the Bazel binary. However, it can be set to the path (relative to the root of the current workspace) of an alternate builtins_bzl/ directory, such as one in a Bazel source tree workspace. A literal value of "%workspace%" is equivalent to the relative package path of builtins_bzl/ within a Bazel source tree; this should only be used when running Bazel within its own source tree. Finally, a value of the empty string disables the builtins injection mechanism entirely.

--experimental_builtins_bzl_path

Allows multiple
False
Documentation category
undocumented
Option effect tags
loses_incremental_statebuild_file_semantics
Option metadata tags
experimental

--experimental_builtins_dummy 🔗

Use with: common

Enables an internal dummy symbol used to test builtins injection.

--[no]experimental_builtins_dummy

Allows multiple
False
Documentation category
undocumented
Option effect tags
build_file_semantics
Option metadata tags
experimental

--experimental_builtins_injection_override 🔗

Use with: common

A comma-separated list of symbol names prefixed by a + or - character, indicating which symbols from `@_builtins//:exports.bzl` to inject, overriding their default injection status. Precisely, this works as follows. Each dict key of `exported_toplevels` or `exported_rules` has the form `foo`, `+foo`, or `-foo`. The first two forms mean it gets injected by default, while the last form means it does not get injected by default. In the first case (unprefixed), the default is absolute and cannot be overridden. Otherwise, we then consult this options list, and if we see foo occur here, we take the prefix of its last occurrence and use that to decide whether or not to inject. It is a no-op to specify an unknown symbol, or to attempt to not inject a symbol that occurs unprefixed in a dict key.

--experimental_builtins_injection_override

Allows multiple
True
Documentation category
undocumented
Option effect tags
loading_and_analysis
Option metadata tags
experimental

--experimental_bytecode_optimizers 🔗

Use with: configuration

Do not use.

--experimental_bytecode_optimizers

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown

--experimental_bzl_visibility 🔗

Use with: common

If enabled, adds a `visibility()` function that .bzl files may call during top-level evaluation to set their visibility for the purpose of load() statements.

--[no]experimental_bzl_visibility

Allows multiple
False
Documentation category
starlark_semantics
Option effect tags
loading_and_analysis
Option metadata tags
experimental

--experimental_cancel_concurrent_tests 🔗

Use with: configuration

If true, then Blaze will cancel concurrently running tests on the first successful run. This is only useful in combination with --runs_per_test_detects_flakes.

--[no]experimental_cancel_concurrent_tests

Allows multiple
False
Documentation category
uncategorized
Option effect tags
affects_outputsloading_and_analysis

--experimental_cc_implementation_deps 🔗

Use with: configuration

If enabled, cc_library targets can use attribute `implementation_deps`.

--[no]experimental_cc_implementation_deps

Allows multiple
False
Documentation category
undocumented
Option effect tags
loading_and_analysis
Option metadata tags
experimental

--experimental_cc_shared_library 🔗

Use with: common

If set to true, rule attributes and Starlark API methods needed for the rule cc_shared_library will be available

--[no]experimental_cc_shared_library

Allows multiple
False
Documentation category
starlark_semantics
Option effect tags
build_file_semanticsloading_and_analysis
Option metadata tags
experimental

--experimental_cc_skylark_api_enabled_packages 🔗

Use with: common

Passes list of packages that can use the C++ Starlark API. Don't enable this flag yet, we will be making breaking changes.

--experimental_cc_skylark_api_enabled_packages

Allows multiple
False
Documentation category
undocumented
Option effect tags
loading_and_analysis
Option metadata tags
experimental

--experimental_check_desugar_deps 🔗

Use with: configuration

Whether to double-check correct desugaring at Android binary level.

--[no]experimental_check_desugar_deps

Allows multiple
False
Documentation category
input_strictness
Option effect tags
eagerness_to_exitloading_and_analysis
Option metadata tags
experimental

--experimental_check_external_repository_files 🔗

Use with: common

Check for modifications to files in external repositories. Consider setting this flag to false if you don't expect these files to change outside of bazel since it will speed up subsequent runs as they won't have to check a previous run's cache.

--[no]experimental_check_external_repository_files

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown

--experimental_check_output_files 🔗

Use with: buildcanonicalize-flagsfetchmodquerysync

Check for modifications made to the output files of a build. Consider setting this flag to false if you don't expect these files to change outside of bazel since it will speed up subsequent runs as they won't have to check a previous run's cache.

--[no]experimental_check_output_files

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown

--experimental_circuit_breaker_strategy 🔗

Use with: buildcommon

Specifies the strategy for the circuit breaker to use. Available strategies are "failure". On invalid value for the option the behavior same as the option is not set.

--experimental_circuit_breaker_strategy

Allows multiple
False
Documentation category
remote
Option effect tags
execution

--experimental_clear_nested_sets_after_action_execution 🔗

Use with: build

Clears the memoization in the input NestedSet of an action after its execution concludes in order to reclaim memory.

--[no]experimental_clear_nested_sets_after_action_execution

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown

--experimental_collect_code_coverage_for_generated_files 🔗

Use with: configuration

If specified, Bazel will also generate collect coverage information for generated files.

--[no]experimental_collect_code_coverage_for_generated_files

Allows multiple
False
Documentation category
output_parameters
Option effect tags
affects_outputs

--experimental_collect_load_average_in_profiler 🔗

Use with: common

If enabled, the profiler collects the system's overall load average.

--[no]experimental_collect_load_average_in_profiler

Allows multiple
False
Documentation category
logging
Option effect tags
bazel_monitoring

--experimental_collect_local_action_metrics 🔗

Use with: build

Deprecated no-op.

--[no]experimental_collect_local_action_metrics

Allows multiple
False
Documentation category
undocumented
Option effect tags
execution

--experimental_collect_local_sandbox_action_metrics 🔗

Use with: build

Deprecated no-op.

--[no]experimental_collect_local_sandbox_action_metrics

Allows multiple
False
Documentation category
logging
Option effect tags
execution

--experimental_collect_pressure_stall_indicators 🔗

Use with: common

If enabled, the profiler collects the Linux PSI data.

--[no]experimental_collect_pressure_stall_indicators

Allows multiple
False
Documentation category
logging
Option effect tags
bazel_monitoring

--experimental_collect_resource_estimation 🔗

Use with: common

If enabled, the profiler collects CPU and memory usage estimation for local actions.

--[no]experimental_collect_resource_estimation

Allows multiple
False
Documentation category
logging
Option effect tags
bazel_monitoring

--experimental_collect_system_network_usage 🔗

Use with: common

If enabled, the profiler collects the system's network usage.

--[no]experimental_collect_system_network_usage

Allows multiple
False
Documentation category
logging
Option effect tags
bazel_monitoring

--experimental_collect_worker_data_in_profiler 🔗

Use with: common

If enabled, the profiler collects worker's aggregated resource data.

--[no]experimental_collect_worker_data_in_profiler

Allows multiple
False
Documentation category
logging
Option effect tags
bazel_monitoring

--experimental_command_profile 🔗

Use with: common

Records a Java Flight Recorder CPU profile into a profile.jfr file in the output base directory. The syntax and semantics of this flag might change in the future to support different profile types or output formats; use at your own risk.

--[no]experimental_command_profile

Allows multiple
False
Documentation category
logging
Option effect tags
unknown

Use with: build

This flag controls how the convenience symlinks (the symlinks that appear in the workspace after the build) will be managed. Possible values: normal (default): Each kind of convenience symlink will be created or deleted, as determined by the build. clean: All symlinks will be unconditionally deleted. ignore: Symlinks will be left alone. log_only: Generate log messages as if 'normal' were passed, but don't actually perform any filesystem operations (useful for tools). Note that only symlinks whose names are generated by the current value of --symlink_prefix can be affected; if the prefix changes, any pre-existing symlinks will be left alone.

--experimental_convenience_symlinks

Allows multiple
False
Documentation category
output_parameters
Option effect tags
affects_outputs

Use with: build

This flag controls whether or not we will post the build eventConvenienceSymlinksIdentified to the BuildEventProtocol. If the value is true, the BuildEventProtocol will have an entry for convenienceSymlinksIdentified, listing all of the convenience symlinks created in your workspace. If false, then the convenienceSymlinksIdentified entry in the BuildEventProtocol will be empty.

--[no]experimental_convenience_symlinks_bep_event

Allows multiple
False
Documentation category
output_parameters
Option effect tags
affects_outputs

--experimental_cpp_compile_resource_estimation 🔗

Use with: configuration

If enabled, will estimate precise resource usage for local execution of CppCompileAction.

--[no]experimental_cpp_compile_resource_estimation

Allows multiple
False
Documentation category
undocumented
Option effect tags
execution
Option metadata tags
experimental

Use with: build

If enabled, two convenience symlinks, `py2` and `py3`, will be created (with the appropriate prefix). These point to the output directories for the Python 2 and Python 3 configurations, respectively. This can be used to access outputs in the bin directory of a specific Python version. For instance, if --symlink_prefix is `foo-`, the path `foo-py2/bin` behaves like `foo-bin` except that it is guaranteed to contain artifacts built in the Python 2 configuration. IMPORTANT: This flag is not planned to be enabled by default, and should not be relied on.

--[no]experimental_create_py_symlinks

Allows multiple
False
Documentation category
undocumented
Option effect tags
affects_outputs

--experimental_debug_selects_always_succeed 🔗

Use with: configuration

When set, select functions with no matching clause will return an empty value, instead of failing. This is to help use cquery diagnose failures in select.

--[no]experimental_debug_selects_always_succeed

Allows multiple
False
Documentation category
undocumented
Option effect tags
loading_and_analysis

--experimental_disable_external_package 🔗

Use with: common

If set to true, the auto-generated //external package will not be available anymore. Bazel will still be unable to parse the file 'external/BUILD', but globs reaching into external/ from the unnamed package will work.

--[no]experimental_disable_external_package

Allows multiple
False
Documentation category
starlark_semantics
Option effect tags
loading_and_analysisloses_incremental_state
Option metadata tags
experimental

--experimental_disable_instrumentation_manifest_merge 🔗

Use with: configuration

Disables manifest merging when an android_binary has instruments set (i.e. is used for instrumentation testing).

--[no]experimental_disable_instrumentation_manifest_merge

Allows multiple
False
Documentation category
undocumented
Option effect tags
affects_outputs

--experimental_disallow_legacy_java_toolchain_flags 🔗

Use with: configuration

If enabled, disallow legacy Java toolchain flags (--javabase, --host_javabase, --java_toolchain, --host_java_toolchain) and require the use of --platforms instead; see #7849

--[no]experimental_disallow_legacy_java_toolchain_flags

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown

--experimental_docker_image 🔗

Use with: build

Specify a Docker image name (e.g. "ubuntu:latest") that should be used to execute a sandboxed action when using the docker strategy and the action itself doesn't already have a container-image attribute in its remote_execution_properties in the platform description. The value of this flag is passed verbatim to 'docker run', so it supports the same syntax and mechanisms as Docker itself.

--experimental_docker_image

Allows multiple
False
Documentation category
execution_strategy
Option effect tags
execution

--experimental_docker_privileged 🔗

Use with: build

If enabled, Bazel will pass the --privileged flag to 'docker run' when running actions. This might be required by your build, but it might also result in reduced hermeticity.

--[no]experimental_docker_privileged

Allows multiple
False
Documentation category
input_strictness
Option effect tags
execution

--experimental_docker_use_customized_images 🔗

Use with: build

If enabled, injects the uid and gid of the current user into the Docker image before using it. This is required if your build / tests depend on the user having a name and home directory inside the container. This is on by default, but you can disable it in case the automatic image customization feature doesn't work in your case or you know that you don't need it.

--[no]experimental_docker_use_customized_images

Allows multiple
False
Documentation category
execution_strategy
Option effect tags
execution

--experimental_docker_verbose 🔗

Use with: build

If enabled, Bazel will print more verbose messages about the Docker sandbox strategy.

--[no]experimental_docker_verbose

Allows multiple
False
Documentation category
logging
Option effect tags
execution

--experimental_downloader_config 🔗

Use with: common

Specify a file to configure the remote downloader with. This file consists of lines, each of which starts with a directive (`allow`, `block` or `rewrite`) followed by either a host name (for `allow` and `block`) or two patterns, one to match against, and one to use as a substitute URL, with back-references starting from `$1`. It is possible for multiple `rewrite` directives for the same URL to be give, and in this case multiple URLs will be returned.

--experimental_downloader_config

Allows multiple
False
Documentation category
remote
Option effect tags
unknown

--experimental_dynamic_exclude_tools 🔗

Use with: build

When set, targets that are build "for tool" are not subject to dynamic execution. Such targets are extremely unlikely to be built incrementally and thus not worth spending local cycles on.

--[no]experimental_dynamic_exclude_tools

Allows multiple
False
Documentation category
execution_strategy
Option effect tags
executionhost_machine_resource_optimizations

--experimental_dynamic_ignore_local_signals 🔗

Use with: build

Takes a list of OS signal numbers. If a local branch of dynamic execution gets killed with any of these signals, the remote branch will be allowed to finish instead. For persistent workers, this only affects signals that kill the worker process.

--experimental_dynamic_ignore_local_signals

Allows multiple
False
Documentation category
build_time_optimization
Option effect tags
execution

--experimental_dynamic_local_load_factor 🔗

Use with: build

Controls how much load from dynamic execution to put on the local machine. This flag adjusts how many actions in dynamic execution we will schedule concurrently. It is based on the number of CPUs Blaze thinks is available, which can be controlled with the --local_cpu_resources flag. If this flag is 0, all actions are scheduled locally immediately. If > 0, the amount of actions scheduled locally is limited by the number of CPUs available. If < 1, the load factor is used to reduce the number of locally scheduled actions when the number of actions waiting to schedule is high. This lessens the load on the local machine in the clean build case, where the local machine does not contribute much.

--experimental_dynamic_local_load_factor

Allows multiple
False
Documentation category
execution_strategy
Option effect tags
executionhost_machine_resource_optimizations

--experimental_dynamic_slow_remote_time 🔗

Use with: build

If >0, the time a dynamically run action must run remote-only before we prioritize its local execution to avoid remote timeouts. This may hide some problems on the remote execution system. Do not turn this on without monitoring of remote execution issues.

--experimental_dynamic_slow_remote_time

Allows multiple
False
Documentation category
execution_strategy
Option effect tags
executionhost_machine_resource_optimizations

--experimental_enable_android_migration_apis 🔗

Use with: common

If set to true, enables the APIs required to support the Android Starlark migration.

--[no]experimental_enable_android_migration_apis

Allows multiple
False
Documentation category
starlark_semantics
Option effect tags
build_file_semantics

--experimental_enable_aspect_hints 🔗

Use with: common

--[no]experimental_enable_aspect_hints

Allows multiple
False
Documentation category
undocumented
Option effect tags
loading_and_analysis
Option metadata tags
experimental

--experimental_enable_critical_path_profiling 🔗

Use with: build

If set (the default), critical path profiling is enabled for the execution phase. This has a slight overhead in RAM and CPU, and may prevent Bazel from making certain aggressive RAM optimizations in some cases.

--[no]experimental_enable_critical_path_profiling

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown

--experimental_enable_docker_sandbox 🔗

Use with: build

Enable Docker-based sandboxing. This option has no effect if Docker is not installed.

--[no]experimental_enable_docker_sandbox

Allows multiple
False
Documentation category
execution_strategy
Option effect tags
execution

--experimental_enable_execution_graph_log 🔗

Use with: build

Enabling this flag makes Blaze write a file of all actions executed during a build. Note that this dump may use a different granularity of actions than other APIs, and may also contain additional information as necessary to reconstruct the full dependency graph in combination with other sources of data.

--[no]experimental_enable_execution_graph_log

Allows multiple
False
Documentation category
undocumented
Option effect tags
affects_outputs

--experimental_enable_jspecify 🔗

Use with: configuration

Enable experimental jspecify integration.

--[no]experimental_enable_jspecify

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown

--experimental_enable_scl_dialect 🔗

Use with: common

If set to true, .scl files may be used in load() statements.

--[no]experimental_enable_scl_dialect

Allows multiple
False
Documentation category
starlark_semantics
Option effect tags
build_file_semantics

--experimental_enable_starlark_doc_extract 🔗

Use with: build

Deprecated no-op.

--[no]experimental_enable_starlark_doc_extract

Allows multiple
False
Documentation category
undocumented
Option effect tags
loading_and_analysis
Option metadata tags
experimental

--experimental_exclude_defines_from_exec_config 🔗

Use with: configuration

If true, don't propagate '--define's to the exec transition at default; only propagate defines specified by `--experimental_propagate_custom_flag`.

--[no]experimental_exclude_defines_from_exec_config

Allows multiple
False
Documentation category
undocumented
Option effect tags
affects_outputs
Option metadata tags
experimental

--experimental_exclude_starlark_flags_from_exec_config 🔗

Use with: configuration

If true, don't propagate starlark flags to the exec transition at default; only propagate starlark flags specified in `--experimental_propagate_custom_flag`.

--[no]experimental_exclude_starlark_flags_from_exec_config

Allows multiple
False
Documentation category
undocumented
Option effect tags
affects_outputs
Option metadata tags
experimental

--experimental_exec_config 🔗

Use with: configuration

If set to '//some:label:my.bzl%my_transition', uses my_transition for 'cfg = "exec"' semantics instead of Bazel's internal exec transition logic. Else uses Bazel's internal logic.

--experimental_exec_config

Allows multiple
False
Documentation category
undocumented
Option effect tags
bazel_internal_configuration
Option metadata tags
experimental

--experimental_exec_configuration_distinguisher 🔗

Use with: configuration

Please only use this flag as part of a suggested migration or testing strategy due to potential for action conflicts. Controls how the execution transition changes the platform_suffix flag. In legacy mode, sets it to a hash of the execution platform. In fullhash mode, sets it to a hash of the entire configuration. In off mode, does not touch it.

--experimental_exec_configuration_distinguisher

Allows multiple
False
Documentation category
undocumented
Option effect tags
affects_outputs
Option metadata tags
experimental

--experimental_execution_graph_enable_edges_from_filewrite_actions 🔗

Use with: build

Handle edges from filewrite actions to their inputs correctly.

--[no]experimental_execution_graph_enable_edges_from_filewrite_actions

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown

--experimental_execution_graph_log_dep_type 🔗

Use with: build

Selects what kind of dependency information is reported in the action dump. If 'all', every inter-action edge will be reported.

--experimental_execution_graph_log_dep_type

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown

--experimental_execution_graph_log_middleman 🔗

Use with: build

Subscribe to ActionMiddlemanEvent in ExecutionGraphModule.

--[no]experimental_execution_graph_log_middleman

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown

--experimental_execution_graph_log_path 🔗

Use with: build

Local path at which the execution path will be written. If this is set, the log will only be written locally, and not to BEP. If this is set when experimental_enable_execution_graph_log is disabled, there will be an error. If this is unset while BEP uploads are disabled and experimental_enable_execution_graph_log is enabled, the log will be written to a local default.

--experimental_execution_graph_log_path

Allows multiple
False
Documentation category
undocumented
Option effect tags
affects_outputs

--experimental_execution_graph_log_queue_size 🔗

Use with: build

The size of the action dump queue, where actions are kept before writing. Larger sizes will increase peak memory usage, but should decrease queue blocking. -1 means unbounded

--experimental_execution_graph_log_queue_size

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown

--experimental_execution_log_compact_file 🔗

Use with: build

Log the executed spawns into this file as length-delimited ExecLogEntry protos, according to src/main/protobuf/spawn.proto. This is an experimental format under active development, and may change at any time. Related flags: --execution_log_binary_file (binary protobuf format; mutually exclusive), --execution_log_json_file (text JSON format; mutually exclusive), --subcommands (for displaying subcommands in terminal output).

--experimental_execution_log_compact_file

Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown

--experimental_explicit_aspects 🔗

Use with: aquerycqueryquery

aquery, cquery: whether to include aspect-generated actions in the output. query: no-op (aspects are always followed).

--[no]experimental_explicit_aspects

Allows multiple
False
Documentation category
query
Option effect tags
terminal_output

--experimental_extended_sanity_checks 🔗

Use with: configuration

Enables internal validation checks to make sure that configured target implementations only access things they should. Causes a performance hit.

--[no]experimental_extended_sanity_checks

Allows multiple
False
Documentation category
undocumented
Option effect tags
bazel_internal_configuration
Option metadata tags
experimental

--experimental_extra_action_filter 🔗

Use with: build

Deprecated in favor of aspects. Filters set of targets to schedule extra_actions for.

--experimental_extra_action_filter

Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown

--experimental_extra_action_top_level_only 🔗

Use with: build

Deprecated in favor of aspects. Only schedules extra_actions for top level targets.

--[no]experimental_extra_action_top_level_only

Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown

--experimental_fetch_all_coverage_outputs 🔗

Use with: configuration

If true, then Bazel fetches the entire coverage data directory for each test during a coverage run.

--[no]experimental_fetch_all_coverage_outputs

Allows multiple
False
Documentation category
uncategorized
Option effect tags
affects_outputsloading_and_analysis

--experimental_filter_library_jar_with_program_jar 🔗

Use with: configuration

Filter the ProGuard ProgramJar to remove any classes also present in the LibraryJar.

--[no]experimental_filter_library_jar_with_program_jar

Allows multiple
False
Documentation category
build_time_optimization
Option effect tags
action_command_lines

--experimental_filter_r_jars_from_android_test 🔗

Use with: configuration

If enabled, R Jars will be filtered from the test apk built by android_test.

--[no]experimental_filter_r_jars_from_android_test

Allows multiple
False
Documentation category
undocumented
Option effect tags
changes_inputs

--experimental_fix_deps_tool 🔗

Use with: configuration

Specifies which tool should be used to resolve missing dependencies.

--experimental_fix_deps_tool

Allows multiple
False
Documentation category
undocumented
Option effect tags
build_file_semantics

--experimental_force_gc_after_build 🔗

Use with: common

If true calls System.gc() after a build to try and get a post-gc peak heap measurement.

--[no]experimental_force_gc_after_build

Allows multiple
False
Documentation category
undocumented
Option effect tags
bazel_internal_configuration

--experimental_fsvc_threads 🔗

Use with: build

The number of threads that are used by the FileSystemValueChecker.

--experimental_fsvc_threads

Allows multiple
False
Documentation category
undocumented
Option effect tags
execution
Option metadata tags
experimental

--experimental_generate_llvm_lcov 🔗

Use with: configuration

If true, coverage for clang will generate an LCOV report.

--[no]experimental_generate_llvm_lcov

Allows multiple
False
Documentation category
uncategorized
Option effect tags
affects_outputsloading_and_analysis

--experimental_genquery_use_graphless_query 🔗

Use with: build

Deprecated. No-op.

--[no]experimental_genquery_use_graphless_query

Allows multiple
False
Documentation category
undocumented
Option effect tags
bazel_internal_configurationaffects_outputsloading_and_analysis

--experimental_get_android_java_resources_from_optimized_jar 🔗

Use with: configuration

Get Java resources from _proguard.jar instead of _deploy.jar in android_binary when bundling the final APK.

--[no]experimental_get_android_java_resources_from_optimized_jar

Allows multiple
False
Documentation category
undocumented
Option effect tags
changes_inputs

--experimental_google_legacy_api 🔗

Use with: common

If set to true, exposes a number of experimental pieces of Starlark build API pertaining to Google legacy code.

--[no]experimental_google_legacy_api

Allows multiple
False
Documentation category
starlark_semantics
Option effect tags
loading_and_analysis
Option metadata tags
experimental

--experimental_graphless_query 🔗

Use with: query

If true, uses a Query implementation that does not make a copy of the graph. The new implementation only supports --order_output=no, as well as only a subset of output formatters.

--[no]experimental_graphless_query

Allows multiple
False
Documentation category
query
Option effect tags
build_file_semanticseagerness_to_exit

--experimental_guard_against_concurrent_changes 🔗

Use with: buildcommon

Turn this off to disable checking the ctime of input files of an action before uploading it to a remote cache. There may be cases where the Linux kernel delays writing of files, which could cause false positives.

--[no]experimental_guard_against_concurrent_changes

Allows multiple
False
Documentation category
remote
Option effect tags
unknown

--experimental_import_deps_checking 🔗

Use with: configuration

When enabled, check whether the dependencies of an aar_import are complete. This enforcement can break the build, or can just result in warnings.

--experimental_import_deps_checking

Allows multiple
False
Documentation category
input_strictness
Option effect tags
loading_and_analysis

--experimental_include_default_values 🔗

Use with: canonicalize-flags

Whether Starlark options set to their default values are included in the output.

--[no]experimental_include_default_values

Allows multiple
False
Documentation category
output_selection
Option effect tags
affects_outputsterminal_output

--experimental_include_scanning_parallelism 🔗

Use with: build

Configures the size of the thread pool used for include scanning. Takes an integer, or a keyword ("auto", "HOST_CPUS", "HOST_RAM"), optionally followed by an operation ([-|*]<float>) eg. "auto", "HOST_CPUS*.5". 0 means to disable parallelism and to just rely on the build graph parallelism for concurrency. "auto" means to use a reasonable value derived from the machine's hardware profile (e.g. the number of processors).

--experimental_include_scanning_parallelism

Allows multiple
False
Documentation category
undocumented
Option effect tags
bazel_internal_configurationexecutionhost_machine_resource_optimizations

--experimental_include_xcode_execution_requirements 🔗

Use with: configuration

If set, add a "requires-xcode:{version}" execution requirement to every Xcode action. If the xcode version has a hyphenated label, also add a "requires-xcode-label:{version_label}" execution requirement.

--[no]experimental_include_xcode_execution_requirements

Allows multiple
False
Documentation category
toolchain
Option effect tags
loses_incremental_stateloading_and_analysisexecution

--experimental_incremental_dexing_after_proguard 🔗

Use with: configuration

Whether to use incremental dexing tools when building proguarded Android binaries. Values > 0 turn the feature on, values > 1 run that many dexbuilder shards.

--experimental_incremental_dexing_after_proguard

Allows multiple
False
Documentation category
undocumented
Option effect tags
loading_and_analysisloses_incremental_state

--experimental_incremental_dexing_after_proguard_by_default 🔗

Use with: configuration

Whether to use incremental dexing for proguarded Android binaries by default. Use incremental_dexing attribute to override default for a particular android_binary.

--[no]experimental_incremental_dexing_after_proguard_by_default

Allows multiple
False
Documentation category
undocumented
Option effect tags
loading_and_analysis
Option metadata tags
experimental

--experimental_inmemory_dotd_files 🔗

Use with: configuration

If enabled, C++ .d files will be passed through in memory directly from the remote build nodes instead of being written to disk.

--[no]experimental_inmemory_dotd_files

Allows multiple
False
Documentation category
build_time_optimization
Option effect tags
loading_and_analysisexecutionaffects_outputs
Option metadata tags
experimental

--experimental_inmemory_dotincludes_files 🔗

Use with: build

If enabled, searching for '#include' lines in generated header files will not touch local disk. This makes include scanning of C++ files less disk-intensive.

--[no]experimental_inmemory_dotincludes_files

Allows multiple
False
Documentation category
undocumented
Option effect tags
bazel_internal_configurationexecutionhost_machine_resource_optimizations

--experimental_inmemory_jdeps_files 🔗

Use with: configuration

If enabled, the dependency (.jdeps) files generated from Java compilations will be passed through in memory directly from the remote build nodes instead of being written to disk.

--[no]experimental_inmemory_jdeps_files

Allows multiple
False
Documentation category
build_time_optimization
Option effect tags
loading_and_analysisexecutionaffects_outputs
Option metadata tags
experimental

Use with: configuration

Whether to make direct file system calls to create symlink trees

--[no]experimental_inprocess_symlink_creation

Allows multiple
False
Documentation category
execution_strategy
Option effect tags
loading_and_analysisexecution
Option metadata tags
experimental

--experimental_isolated_extension_usages 🔗

Use with: common

If true, enables the <code>isolate</code> parameter in the <a href="https://bazel.build/rules/lib/globals/module#use_extension"><code>use_extension</code></a> function.

--[no]experimental_isolated_extension_usages

Allows multiple
False
Documentation category
starlark_semantics
Option effect tags
loading_and_analysis

--experimental_j2objc_header_map 🔗

Use with: configuration

Whether to generate J2ObjC header map in parallel of J2ObjC transpilation.

--[no]experimental_j2objc_header_map

Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown

--experimental_j2objc_shorter_header_path 🔗

Use with: configuration

Whether to generate with shorter header path (uses "_ios" instead of "_j2objc").

--[no]experimental_j2objc_shorter_header_path

Allows multiple
False
Documentation category
uncategorized
Option effect tags
affects_outputs

--experimental_java_classpath 🔗

Use with: configuration

Enables reduced classpaths for Java compilations.

--experimental_java_classpath

Old name
--java_classpath
Warn old name
True
Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown

--experimental_java_header_input_pruning 🔗

Use with: configuration

If enabled, header compilation actions support --java_classpath=bazel

--[no]experimental_java_header_input_pruning

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown

--experimental_java_library_export 🔗

Use with: common

If enabled, experimental_java_library_export_do_not_use module is available.

--[no]experimental_java_library_export

Allows multiple
False
Documentation category
starlark_semantics
Option effect tags
loading_and_analysis
Option metadata tags
incompatible_change

--experimental_java_proto_add_allowed_public_imports 🔗

Use with: common

This flag is a noop and scheduled for removal.

--[no]experimental_java_proto_add_allowed_public_imports

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown
Option metadata tags
experimental

--experimental_java_test_auto_create_deploy_jar 🔗

Use with: configuration

DO NOT USE

--[no]experimental_java_test_auto_create_deploy_jar

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown

--experimental_limit_android_lint_to_android_constrained_java 🔗

Use with: configuration

Limit --experimental_run_android_lint_on_java_rules to Android-compatible libraries.

--[no]experimental_limit_android_lint_to_android_constrained_java

Allows multiple
False
Documentation category
uncategorized
Option effect tags
affects_outputs

Use with: configuration

If enabled, cc_shared_library will link all libraries statically linked into it, that should only be linked once.

--[no]experimental_link_static_libraries_once

Allows multiple
False
Documentation category
undocumented
Option effect tags
loading_and_analysis
Option metadata tags
incompatible_changeexperimental

--experimental_local_java_optimization_configuration 🔗

Use with: configuration

Do not use.

--experimental_local_java_optimization_configuration

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown

--experimental_local_java_optimizations 🔗

Use with: configuration

Do not use.

--[no]experimental_local_java_optimizations

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown

--experimental_local_lockfree_output 🔗

Use with: build

When true, the local spawn runner doesn't lock the output tree during dynamic execution. Instead, spawns are allowed to execute until they are explicitly interrupted by a faster remote action.

--[no]experimental_local_lockfree_output

Allows multiple
False
Documentation category
undocumented
Option effect tags
execution

--experimental_local_retries_on_crash 🔗

Use with: build

Number of times to retry a local action when we detect that it crashed. This exists to workaround a bug in OSXFUSE which is tickled by the use of the dynamic scheduler and --experimental_local_lockfree_output due to constant process churn. The bug can be triggered by a cancelled process that ran *before* the process we are trying to run, introducing corruption in its file reads.

--experimental_local_retries_on_crash

Allows multiple
False
Documentation category
undocumented
Option effect tags
execution

--experimental_materialize_param_files_directly 🔗

Use with: build

If materializing param files, do so with direct writes to disk.

--[no]experimental_materialize_param_files_directly

Allows multiple
False
Documentation category
logging
Option effect tags
execution

--experimental_max_directories_to_eagerly_visit_in_globbing 🔗

Use with: buildcanonicalize-flagsfetchmodquerysync

If non-negative, the first time a glob is evaluated in a package, the subdirectories of the package will be traversed in order to warm filesystem caches and compensate for lack of parallelism in globbing. At most this many directories will be visited.

--experimental_max_directories_to_eagerly_visit_in_globbing

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown

--experimental_merged_skyframe_analysis_execution 🔗

Use with: build

If this flag is set, the analysis and execution phases of Skyframe are merged.

--[no]experimental_merged_skyframe_analysis_execution

Allows multiple
False
Documentation category
undocumented
Option effect tags
loading_and_analysisexecution
Option metadata tags
experimental

--experimental_objc_fastbuild_options 🔗

Use with: configuration

Uses these strings as objc fastbuild compiler options.

--experimental_objc_fastbuild_options

Allows multiple
False
Documentation category
output_parameters
Option effect tags
action_command_lines

--experimental_objc_include_scanning 🔗

Use with: configuration

Whether to perform include scanning for objective C/C++.

--[no]experimental_objc_include_scanning

Allows multiple
False
Documentation category
build_time_optimization
Option effect tags
loading_and_analysisexecutionchanges_inputs

--experimental_objc_provider_from_linked 🔗

Use with: configuration

No-op. Kept here for backwards compatibility. This field will be removed in a future release.

--[no]experimental_objc_provider_from_linked

Allows multiple
False
Documentation category
undocumented
Option effect tags
no_op

--experimental_omit_resources_info_provider_from_android_binary 🔗

Use with: configuration

Omit AndroidResourcesInfo provider from android_binary rules. Propagating resources out to other binaries is usually unintentional.

--[no]experimental_omit_resources_info_provider_from_android_binary

Allows multiple
False
Documentation category
undocumented
Option effect tags
affects_outputs

--experimental_omitfp 🔗

Use with: configuration

If true, use libunwind for stack unwinding, and compile with -fomit-frame-pointer and -fasynchronous-unwind-tables.

--[no]experimental_omitfp

Allows multiple
False
Documentation category
output_parameters
Option effect tags
action_command_linesaffects_outputs
Option metadata tags
experimental

--experimental_one_version_enforcement 🔗

Use with: configuration

When enabled, enforce that a java_binary rule can't contain more than one version of the same class file on the classpath. This enforcement can break the build, or can just result in warnings.

--experimental_one_version_enforcement

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown

--experimental_one_version_enforcement_use_transitive_jars_for_binary_under_test 🔗

Use with: configuration

If enabled, one version enforcement for android_test uses the binary_under_test's transitive classpath, otherwise it uses the deploy jar

--[no]experimental_one_version_enforcement_use_transitive_jars_for_binary_under_test

Allows multiple
False
Documentation category
undocumented
Option effect tags
bazel_internal_configurationaction_command_lines

--experimental_oom_sensitive_skyfunctions_semaphore_size 🔗

Use with: build

Sets the size of the semaphore used to prevent SkyFunctions with large peak memory requirement from OOM-ing blaze. A value of 0 indicates that no semaphore should be used. Example value: "HOST_CPUS*0.5".

--experimental_oom_sensitive_skyfunctions_semaphore_size

Allows multiple
False
Documentation category
undocumented
Option effect tags
loading_and_analysisbazel_internal_configuration
Option metadata tags
experimental

--experimental_output_directory_naming_scheme 🔗

Use with: configuration

Please only use this flag as part of a suggested migration or testing strategy. In legacy mode, transitions (generally only Starlark) set and use `affected by Starlark transition` to determine the ST hash. In diff_against_baseline mode, `affected by Starlark transition` is ignored and instead ST hash is determined, for all configuration, by diffing against the top-level configuration.

--experimental_output_directory_naming_scheme

Allows multiple
False
Documentation category
undocumented
Option effect tags
affects_outputs
Option metadata tags
experimental

--experimental_output_paths 🔗

Use with: configuration

Which model to use for where in the output tree rules write their outputs, particularly for multi-platform / multi-configuration builds. This is highly experimental. See https://github.com/bazelbuild/bazel/issues/6526 for details. Starlark actions canopt into path mapping by adding the key 'supports-path-mapping' to the 'execution_requirements' dict.

--experimental_output_paths

Allows multiple
False
Documentation category
output_parameters
Option effect tags
loses_incremental_statebazel_internal_configurationaffects_outputsexecution

--experimental_override_name_platform_in_output_dir 🔗

Use with: configuration

Each entry should be of the form label=value where label refers to a platform and values is the desired shortname to use in the output path. Only used when --experimental_platform_in_output_dir is true. Has highest naming priority.

--experimental_override_name_platform_in_output_dir

Allows multiple
True
Documentation category
output_parameters
Option effect tags
affects_outputs
Option metadata tags
experimental

--experimental_parallel_aquery_output 🔗

Use with: build

No-op.

--[no]experimental_parallel_aquery_output

Allows multiple
False
Documentation category
query
Option effect tags
unknown

--experimental_parse_headers_skipped_if_corresponding_srcs_found 🔗

Use with: build

No-op.

--[no]experimental_parse_headers_skipped_if_corresponding_srcs_found

Allows multiple
False
Documentation category
undocumented
Option effect tags
no_op

--experimental_persistent_aar_extractor 🔗

Use with: configuration

Enable persistent aar extractor by using workers.

--[no]experimental_persistent_aar_extractor

Allows multiple
False
Documentation category
execution_strategy
Option effect tags
execution

--experimental_platform_cc_test 🔗

Use with: configuration

If enabled, a Starlark version of cc_test can be used which will use platform-based toolchain() resolution to choose a test runner.

--[no]experimental_platform_cc_test

Allows multiple
False
Documentation category
undocumented
Option effect tags
loading_and_analysis
Option metadata tags
experimental

--experimental_platform_in_output_dir 🔗

Use with: configuration

If true, a shortname for the target platform is used in the output directory name instead of the CPU. The exact scheme is experimental and subject to change: First, in the rare case the --platforms option does not have exactly one value, a hash of the platforms option is used. Next, if any shortname for the current platform was registered by --experimental_override_name_platform_in_output_dir, then that shortname is used. Then, if --experimental_use_platforms_in_output_dir_legacy_heuristic is set, use a shortname based off the current platform Label. Finally, a hash of the platform option is used as a last resort.

--[no]experimental_platform_in_output_dir

Allows multiple
False
Documentation category
output_parameters
Option effect tags
affects_outputs
Option metadata tags
experimental

--experimental_platforms_api 🔗

Use with: common

If set to true, enables a number of platform-related Starlark APIs useful for debugging.

--[no]experimental_platforms_api

Allows multiple
False
Documentation category
starlark_semantics
Option effect tags
loading_and_analysis
Option metadata tags
experimental

--experimental_post_profile_started_event 🔗

Use with: build

No-op.

--[no]experimental_post_profile_started_event

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown

--experimental_prefer_mutual_xcode 🔗

Use with: configuration

If true, use the most recent Xcode that is available both locally and remotely. If false, or if there are no mutual available versions, use the local Xcode version selected via xcode-select.

--[no]experimental_prefer_mutual_xcode

Allows multiple
False
Documentation category
toolchain
Option effect tags
loses_incremental_state

--experimental_process_wrapper_graceful_sigterm 🔗

Use with: build

When true, make the process-wrapper propagate SIGTERMs (used by the dynamic scheduler to stop process trees) to the subprocesses themselves, giving them the grace period in --local_termination_grace_seconds before forcibly sending a SIGKILL.

--[no]experimental_process_wrapper_graceful_sigterm

Allows multiple
False
Documentation category
undocumented
Option effect tags
execution

--experimental_profile_action_counts 🔗

Use with: build

No-op.

--[no]experimental_profile_action_counts

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown

--experimental_profile_additional_tasks 🔗

Use with: common

Specifies additional profile tasks to be included in the profile.

--experimental_profile_additional_tasks

Allows multiple
True
Documentation category
logging
Option effect tags
bazel_monitoring

--experimental_profile_include_primary_output 🔗

Use with: common

Includes the extra "out" attribute in action events that contains the exec path to the action's primary output.

--[no]experimental_profile_include_primary_output

Old name
--[no]experimental_include_primary_output
Warn old name
True
Allows multiple
False
Documentation category
logging
Option effect tags
bazel_monitoring

--experimental_profile_include_target_label 🔗

Use with: common

Includes target label in action events' JSON profile data.

--[no]experimental_profile_include_target_label

Allows multiple
False
Documentation category
logging
Option effect tags
bazel_monitoring

--experimental_propagate_custom_flag 🔗

Use with: configuration

Which custom flags (starlark flags or defines) to propagate to the exec transition, by key. e.g. if '--define=a=b' should be propagated, set `--experimental_propagate_custom_flag=a`

--experimental_propagate_custom_flag

Allows multiple
True
Documentation category
undocumented
Option effect tags
affects_outputs
Option metadata tags
experimental

--experimental_proto_descriptor_sets_include_source_info 🔗

Use with: configuration

Run extra actions for alternative Java api versions in a proto_library.

--[no]experimental_proto_descriptor_sets_include_source_info

Allows multiple
False
Documentation category
output_selection
Option effect tags
affects_outputsloading_and_analysis
Option metadata tags
experimental

--experimental_proto_extra_actions 🔗

Use with: configuration

Run extra actions for alternative Java api versions in a proto_library.

--[no]experimental_proto_extra_actions

Allows multiple
False
Documentation category
output_selection
Option effect tags
affects_outputsloading_and_analysis
Option metadata tags
experimental

--experimental_publish_package_metrics_in_bep 🔗

Use with: common

Whether to publish package metrics in the BEP.

--[no]experimental_publish_package_metrics_in_bep

Allows multiple
False
Documentation category
undocumented
Option effect tags
bazel_monitoring

--experimental_python_import_all_repositories 🔗

Use with: configuration

If true, the roots of repositories in the runfiles tree are added to PYTHONPATH, so that imports like `import mytoplevelpackage.package.module` are valid. Regardless of whether this flag is true, the runfiles root itself is also added to the PYTHONPATH, so `import myreponame.mytoplevelpackage.package.module` is valid. The latter form is less likely to experience import name collisions.

--[no]experimental_python_import_all_repositories

Allows multiple
False
Documentation category
undocumented
Option effect tags
loading_and_analysis

--experimental_record_metrics_for_all_mnemonics 🔗

Use with: common

By default the number of action types is limited to the 20 mnemonics with the largest number of executed actions. Setting this option will write statistics for all mnemonics.

--[no]experimental_record_metrics_for_all_mnemonics

Allows multiple
False
Documentation category
logging
Option effect tags
unknown

--experimental_remotable_source_manifests 🔗

Use with: configuration

Whether to make source manifest actions remotable

--[no]experimental_remotable_source_manifests

Allows multiple
False
Documentation category
execution_strategy
Option effect tags
loading_and_analysisexecution
Option metadata tags
experimental

--experimental_remote_cache_async 🔗

Use with: buildcommon

If true, remote cache I/O will happen in the background instead of taking place as the part of a spawn.

--[no]experimental_remote_cache_async

Allows multiple
False
Documentation category
remote
Option effect tags
unknown

--experimental_remote_cache_eviction_retries 🔗

Use with: build

The maximum number of attempts to retry if the build encountered remote cache eviction error. A non-zero value will implicitly set --incompatible_remote_use_new_exit_code_for_lost_inputs to true. A new invocation id will be generated for each attempt. If you generate invocation id and provide it to Bazel with --invocation_id, you should not use this flag. Instead, set flag --incompatible_remote_use_new_exit_code_for_lost_inputs and check for the exit code 39.

--experimental_remote_cache_eviction_retries

Allows multiple
False
Documentation category
remote
Option effect tags
execution

--experimental_remote_cache_lease_extension 🔗

Use with: buildcommon

If set to true, Bazel will extend the lease for outputs of remote actions during the build by sending `FindMissingBlobs` calls periodically to remote cache. The frequency is based on the value of `--experimental_remote_cache_ttl`.

--[no]experimental_remote_cache_lease_extension

Allows multiple
False
Documentation category
remote
Option effect tags
unknown

--experimental_remote_cache_ttl 🔗

Use with: buildcommon

The guaranteed minimal TTL of blobs in the remote cache after their digests are recently referenced e.g. by an ActionResult or FindMissingBlobs. Bazel does several optimizations based on the blobs' TTL e.g. doesn't repeatedly call GetActionResult in an incremental build. The value should be set slightly less than the real TTL since there is a gap between when the server returns the digests and when Bazel receives them.

--experimental_remote_cache_ttl

Allows multiple
False
Documentation category
remote
Option effect tags
execution

--experimental_remote_capture_corrupted_outputs 🔗

Use with: buildcommon

A path to a directory where the corrupted outputs will be captured to.

--experimental_remote_capture_corrupted_outputs

Allows multiple
False
Documentation category
remote
Option effect tags
unknown

--experimental_remote_discard_merkle_trees 🔗

Use with: buildcommon

If set to true, discard in-memory copies of the input root's Merkle tree and associated input mappings during calls to GetActionResult() and Execute(). This reduces memory usage significantly, but does require Bazel to recompute them upon remote cache misses and retries.

--[no]experimental_remote_discard_merkle_trees

Allows multiple
False
Documentation category
remote
Option effect tags
unknown

--experimental_remote_downloader 🔗

Use with: buildcommon

A Remote Asset API endpoint URI, to be used as a remote download proxy. The supported schemas are grpc, grpcs (grpc with TLS enabled) and unix (local UNIX sockets). If no schema is provided Bazel will default to grpcs. See: https://github.com/bazelbuild/remote-apis/blob/master/build/bazel/remote/asset/v1/remote_asset.proto

--experimental_remote_downloader

Allows multiple
False
Documentation category
remote
Option effect tags
unknown

--experimental_remote_downloader_local_fallback 🔗

Use with: buildcommon

Whether to fall back to the local downloader if remote downloader fails.

--[no]experimental_remote_downloader_local_fallback

Allows multiple
False
Documentation category
remote
Option effect tags
unknown

--experimental_remote_execution_keepalive 🔗

Use with: buildcommon

Whether to use keepalive for remote execution calls.

--[no]experimental_remote_execution_keepalive

Allows multiple
False
Documentation category
remote
Option effect tags
unknown

--experimental_remote_failure_rate_threshold 🔗

Use with: buildcommon

Sets the allowed number of failure rate in percentage for a specific time window after which it stops calling to the remote cache/executor. By default the value is 10. Setting this to 0 means no limitation.

--experimental_remote_failure_rate_threshold

Allows multiple
False
Documentation category
remote
Option effect tags
execution

--experimental_remote_failure_window_interval 🔗

Use with: buildcommon

The interval in which the failure rate of the remote requests are computed. On zero or negative value the failure duration is computed the whole duration of the execution.Following units can be used: Days (d), hours (h), minutes (m), seconds (s), and milliseconds (ms). If the unit is omitted, the value is interpreted as seconds.

--experimental_remote_failure_window_interval

Allows multiple
False
Documentation category
remote
Option effect tags
execution

--experimental_remote_include_extraction_size_threshold 🔗

Use with: build

Run remotable C++ include extraction remotely if the file size in bytes exceeds this.

--experimental_remote_include_extraction_size_threshold

Allows multiple
False
Documentation category
undocumented
Option effect tags
bazel_internal_configurationexecutionhost_machine_resource_optimizations

--experimental_remote_mark_tool_inputs 🔗

Use with: buildcommon

If set to true, Bazel will mark inputs as tool inputs for the remote executor. This can be used to implement remote persistent workers.

--[no]experimental_remote_mark_tool_inputs

Allows multiple
False
Documentation category
remote
Option effect tags
unknown

--experimental_remote_merkle_tree_cache 🔗

Use with: buildcommon

If set to true, Merkle tree calculations will be memoized to improve the remote cache hit checking speed. The memory foot print of the cache is controlled by --experimental_remote_merkle_tree_cache_size.

--[no]experimental_remote_merkle_tree_cache

Allows multiple
False
Documentation category
remote
Option effect tags
unknown

--experimental_remote_merkle_tree_cache_size 🔗

Use with: buildcommon

The number of Merkle trees to memoize to improve the remote cache hit checking speed. Even though the cache is automatically pruned according to Java's handling of soft references, out-of-memory errors can occur if set too high. If set to 0 the cache size is unlimited. Optimal value varies depending on project's size. Default to 1000.

--experimental_remote_merkle_tree_cache_size

Allows multiple
False
Documentation category
remote
Option effect tags
unknown

--experimental_remote_require_cached 🔗

Use with: buildcommon

If set to true, enforce that all actions that can run remotely are cached, or else fail the build. This is useful to troubleshoot non-determinism issues as it allows checking whether actions that should be cached are actually cached without spuriously injecting new results into the cache.

--[no]experimental_remote_require_cached

Allows multiple
False
Documentation category
remote
Option effect tags
unknown

--experimental_remote_scrubbing_config 🔗

Use with: buildcommon

Enables remote cache key scrubbing with the supplied configuration file, which must be a ScrubbingConfig protocol buffer in text format. This feature is intended to facilitate sharing a remote/disk cache between actions executing on different platforms but targeting the same platform. It should be used with extreme care, as improper settings may cause accidental sharing of cache entries and result in incorrect builds. Scrubbing does not affect how an action is executed, only how its remote/disk cache key is computed for the purpose of retrieving or storing an action result. It cannot be used in conjunction with remote execution. Modifying the scrubbing configuration does not invalidate outputs present in the local filesystem or internal caches; a clean build is required to reexecute affected actions. In order to successfully use this feature, you likely want to set a custom --host_platform together with --experimental_platform_in_output_dir (to normalize output prefixes) and --incompatible_strict_action_env (to normalize environment variables).

--experimental_remote_scrubbing_config

Allows multiple
False
Documentation category
remote
Option effect tags
unknown

--experimental_remove_r_classes_from_instrumentation_test_jar 🔗

Use with: configuration

If enabled and the test instruments an application, all the R classes from the test's deploy jar will be removed.

--[no]experimental_remove_r_classes_from_instrumentation_test_jar

Allows multiple
False
Documentation category
undocumented
Option effect tags
changes_inputs

--experimental_repo_remote_exec 🔗

Use with: common

If set to true, repository_rule gains some remote execution capabilities.

--[no]experimental_repo_remote_exec

Allows multiple
False
Documentation category
starlark_semantics
Option effect tags
build_file_semanticsloading_and_analysis
Option metadata tags
experimental

Use with: common

If set, the repository cache will hardlink the file in case of a cache hit, rather than copying. This is intended to save disk space.

--[no]experimental_repository_cache_hardlinks

Allows multiple
False
Documentation category
bazel_client_options
Option effect tags
bazel_internal_configuration

--experimental_repository_cache_urls_as_default_canonical_id 🔗

Use with: common

No-op.

--[no]experimental_repository_cache_urls_as_default_canonical_id

Allows multiple
False
Deprecation warning
This behavior is enabled by default for http_* and jvm_* rules and no longer controlled by this flag. Use --repo_env=BAZEL_HTTP_RULES_URLS_AS_DEFAULT_CANONICAL_ID=0 to disable it instead.
Documentation category
undocumented
Option effect tags
no_op
Option metadata tags
deprecated

--experimental_repository_downloader_retries 🔗

Use with: common

The maximum number of attempts to retry a download error. If set to 0, retries are disabled.

--experimental_repository_downloader_retries

Allows multiple
False
Documentation category
bazel_client_options
Option effect tags
unknown
Option metadata tags
experimental

--experimental_repository_resolved_file 🔗

Use with: buildfetchquerysync

If non-empty, write a Starlark value with the resolved information of all Starlark repository rules that were executed.

--experimental_repository_resolved_file

Allows multiple
False
Documentation category
logging
Option effect tags
affects_outputs

--experimental_require_availability_info 🔗

Use with: build

Deprecated no-op.

--[no]experimental_require_availability_info

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown

--experimental_resolved_file_instead_of_workspace 🔗

Use with: common

If non-empty read the specified resolved file instead of the WORKSPACE file

--experimental_resolved_file_instead_of_workspace

Allows multiple
False
Documentation category
generic_inputs
Option effect tags
changes_inputs

--experimental_retain_test_configuration_across_testonly 🔗

Use with: configuration

When enabled, --trim_test_configuration will not trim the test configuration for rules marked testonly=1. This is meant to reduce action conflict issues when non-test rules depend on cc_test rules. No effect if --trim_test_configuration is false.

--[no]experimental_retain_test_configuration_across_testonly

Allows multiple
False
Documentation category
build_time_optimization
Option effect tags
loading_and_analysisloses_incremental_state

--experimental_reuse_include_scanning_threads 🔗

Use with: build

If enabled core threads of include scanner pool will not die during execution.

--[no]experimental_reuse_include_scanning_threads

Allows multiple
False
Documentation category
undocumented
Option effect tags
bazel_internal_configurationexecutionhost_machine_resource_optimizations

--experimental_rule_extension_api 🔗

Use with: common

Enable experimental rule extension API and subrule APIs

--[no]experimental_rule_extension_api

Allows multiple
False
Documentation category
uncategorized
Option effect tags
loading_and_analysis
Option metadata tags
experimental

--experimental_run_android_lint_on_java_rules 🔗

Use with: configuration

Whether to validate java_* sources.

--[no]experimental_run_android_lint_on_java_rules

Allows multiple
False
Documentation category
uncategorized
Option effect tags
affects_outputs

--experimental_run_bep_event_include_residue 🔗

Use with: buildcommon

Whether to include the command-line residue in run build events which could contain the residue. By default, the residue is not included in run command build events that could contain the residue.

--[no]experimental_run_bep_event_include_residue

Allows multiple
False
Documentation category
logging
Option effect tags
affects_outputs

--experimental_sandbox_async_tree_delete_idle_threads 🔗

Use with: build

If 0, delete sandbox trees as soon as an action completes (causing completion of the action to be delayed). If greater than zero, execute the deletion of such threes on an asynchronous thread pool that has size 1 when the build is running and grows to the size specified by this flag when the server is idle.

--experimental_sandbox_async_tree_delete_idle_threads

Allows multiple
False
Documentation category
execution_strategy
Option effect tags
host_machine_resource_optimizationsexecution

--experimental_sandbox_memory_limit_mb 🔗

Use with: build

If > 0, each Linux sandbox will be limited to the given amount of memory (in MB). Requires cgroups v1 or v2 and permissions for the users to the cgroups dir.

--experimental_sandbox_memory_limit_mb

Allows multiple
False
Documentation category
execution_strategy
Option effect tags
execution

Use with: build

No-op

--[no]experimental_sandboxfs_map_symlink_targets

Allows multiple
False
Documentation category
input_strictness
Option effect tags
host_machine_resource_optimizationsexecution

--experimental_save_feature_state 🔗

Use with: configuration

Save the state of enabled and requested feautres as an output of compilation.

--[no]experimental_save_feature_state

Allows multiple
False
Documentation category
output_selection
Option effect tags
affects_outputs
Option metadata tags
experimental

--experimental_scale_timeouts 🔗

Use with: common

Scale all timeouts in Starlark repository rules by this factor. In this way, external repositories can be made working on machines that are slower than the rule author expected, without changing the source code

--experimental_scale_timeouts

Allows multiple
False
Documentation category
bazel_client_options
Option effect tags
bazel_internal_configuration
Option metadata tags
experimental

--experimental_show_artifacts 🔗

Use with: build

Deprecated no-op.

--[no]experimental_show_artifacts

Allows multiple
False
Documentation category
undocumented
Option effect tags
affects_outputs

--experimental_shrink_worker_pool 🔗

Use with: build

If enabled, could shrink worker pool if worker memory pressure is high. This flag works only when flag experimental_total_worker_memory_limit_mb is enabled.

--[no]experimental_shrink_worker_pool

Allows multiple
False
Documentation category
execution_strategy
Option effect tags
executionhost_machine_resource_optimizations

--experimental_sibling_repository_layout 🔗

Use with: common

If set to true, non-main repositories are planted as symlinks to the main repository in the execution root. That is, all repositories are direct children of the $output_base/execution_root directory. This has the side effect of freeing up $output_base/execution_root/__main__/external for the real top-level 'external' directory.

--[no]experimental_sibling_repository_layout

Allows multiple
False
Documentation category
starlark_semantics
Option effect tags
action_command_linesbazel_internal_configurationloading_and_analysisloses_incremental_state
Option metadata tags
experimental

--experimental_skip_ttvs_for_genquery 🔗

Use with: configuration

If true, genquery loads its scope's transitive closure directly instead of by using 'TransitiveTargetValue' Skyframe work.

--[no]experimental_skip_ttvs_for_genquery

Allows multiple
False
Documentation category
undocumented
Option effect tags
bazel_internal_configuration

--experimental_skyframe_cpu_heavy_skykeys_thread_pool_size 🔗

Use with: build

If set to a positive value (e.g. "HOST_CPUS*1.5"), Skyframe will run the loading/analysis phase with 2 separate thread pools: 1 with <value> threads (ideally close to HOST_CPUS) reserved for CPU-heavy SkyKeys, and 1 "standard" thread pool (whose size is controlled by --loading_phase_threads) for the rest.

--experimental_skyframe_cpu_heavy_skykeys_thread_pool_size

Allows multiple
False
Documentation category
undocumented
Option effect tags
loading_and_analysisbazel_internal_configuration
Option metadata tags
experimental

--experimental_skyframe_native_filesets 🔗

Use with: build

--[no]experimental_skyframe_native_filesets

Allows multiple
False
Deprecation warning
This flag is a no-op and skyframe-native-filesets is always true.
Documentation category
undocumented
Option effect tags
bazel_internal_configuration

--experimental_skyframe_prepare_analysis 🔗

Use with: build

Deprecated. No-op.

--[no]experimental_skyframe_prepare_analysis

Allows multiple
False
Deprecation warning
This flag is a no-op and will be deleted in a future release.
Documentation category
undocumented
Option effect tags
bazel_internal_configuration

--experimental_skyframe_target_pattern_evaluator 🔗

Use with: build

Use the Skyframe-based target pattern evaluator; implies --experimental_interleave_loading_and_analysis.

--[no]experimental_skyframe_target_pattern_evaluator

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown

--experimental_skylark_debug 🔗

Use with: build

If true, Blaze will open the Starlark debug server at the start of the build invocation, and wait for a debugger to attach before running the build.

--[no]experimental_skylark_debug

Allows multiple
False
Documentation category
undocumented
Option effect tags
execution
Option metadata tags
experimental

--experimental_skylark_debug_reset_analysis 🔗

Use with: build

If true, resets analysis before executing the build. Has no effect without --experimental_skylark_debug

--[no]experimental_skylark_debug_reset_analysis

Allows multiple
False
Documentation category
undocumented
Option effect tags
executionloading_and_analysis
Option metadata tags
experimental

--experimental_skylark_debug_server_port 🔗

Use with: build

The port on which the Starlark debug server will listen for connections.

--experimental_skylark_debug_server_port

Allows multiple
False
Documentation category
undocumented
Option effect tags
execution
Option metadata tags
experimental

--experimental_skylark_debug_verbose_logging 🔗

Use with: build

Show verbose logs for the debugger.

--[no]experimental_skylark_debug_verbose_logging

Allows multiple
False
Documentation category
undocumented
Option effect tags
terminal_output
Option metadata tags
experimental

--experimental_skymeld_analysis_overlap_percentage 🔗

Use with: build

The value represents the % of the analysis phase which will be overlapped with the execution phase. A value of x means Skyframe will queue up execution tasks and wait until there's x% of the top level target left to be analyzed before allowing them to launch. When the value is 0%, we'd wait for all analysis to finish before executing (no overlap). When it's 100%, the phases are free to overlap as much as they can.

--experimental_skymeld_analysis_overlap_percentage

Allows multiple
False
Documentation category
undocumented
Option effect tags
loading_and_analysisexecution
Option metadata tags
experimental

--experimental_spawn_scheduler 🔗

Use with: build

Enable dynamic execution by running actions locally and remotely in parallel. Bazel spawns each action locally and remotely and picks the one that completes first. If an action supports workers, the local action will be run in the persistent worker mode. To enable dynamic execution for an individual action mnemonic, use the `--internal_spawn_scheduler` and `--strategy=<mnemonic>=dynamic` flags instead.

--experimental_spawn_scheduler

Allows multiple
False
Deprecation warning
--experimental_spawn_scheduler is deprecated. Using dynamic execution for everything is rarely a good idea (see https://bazel.build/remote/dynamic). If you really want to enable dynamic execution globally, pass `--internal_spawn_scheduler --spawn_strategy=dynamic`.
Documentation category
uncategorized
Expands to
--internal_spawn_scheduler
--spawn_strategy=dynamic
Option effect tags
unknown

--experimental_split_coverage_postprocessing 🔗

Use with: configuration

If true, then Bazel will run coverage postprocessing for test in a new spawn.

--[no]experimental_split_coverage_postprocessing

Allows multiple
False
Documentation category
execution_strategy
Option effect tags
execution

--experimental_split_xml_generation 🔗

Use with: build

If this flag is set, and a test action does not generate a test.xml file, then Bazel uses a separate action to generate a dummy test.xml file containing the test log. Otherwise, Bazel generates a test.xml as part of the test action.

--[no]experimental_split_xml_generation

Allows multiple
False
Documentation category
execution_strategy
Option effect tags
execution

--experimental_starlark_cc_import 🔗

Use with: configuration

If enabled, the Starlark version of cc_import can be used.

--[no]experimental_starlark_cc_import

Allows multiple
False
Documentation category
build_time_optimization
Option effect tags
loading_and_analysis
Option metadata tags
experimental

--experimental_stats_summary 🔗

Use with: build

Enable a modernized summary of the build stats.

--[no]experimental_stats_summary

Allows multiple
False
Documentation category
undocumented
Option effect tags
terminal_output

--experimental_stream_log_file_uploads 🔗

Use with: buildcommon

Stream log file uploads directly to the remote storage rather than writing them to disk.

--[no]experimental_stream_log_file_uploads

Allows multiple
False
Documentation category
logging
Option effect tags
affects_outputs

--experimental_strict_fileset_output 🔗

Use with: configuration

If this option is enabled, filesets will treat all output artifacts as regular files. They will not traverse directories or be sensitive to symlinks.

--[no]experimental_strict_fileset_output

Allows multiple
False
Documentation category
execution_strategy
Option effect tags
execution

--experimental_strict_java_deps 🔗

Use with: configuration

If true, checks that a Java target explicitly declares all directly used targets as dependencies.

--experimental_strict_java_deps

Old name
--strict_java_deps
Warn old name
True
Allows multiple
False
Documentation category
input_strictness
Option effect tags
build_file_semanticseagerness_to_exit

--experimental_throttle_action_cache_check 🔗

Use with: configuration

Whether to throttle the check whether an action is cached.

--[no]experimental_throttle_action_cache_check

Allows multiple
False
Documentation category
undocumented
Option effect tags
execution
Option metadata tags
experimental

--experimental_total_worker_memory_limit_mb 🔗

Use with: build

If this limit is greater than zero idle workers might be killed if the total memory usage of all workers exceed the limit.

--experimental_total_worker_memory_limit_mb

Allows multiple
False
Documentation category
execution_strategy
Option effect tags
executionhost_machine_resource_optimizations

--experimental_turbine_annotation_processing 🔗

Use with: configuration

If enabled, turbine is used for all annotation processing

--[no]experimental_turbine_annotation_processing

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown

--experimental_ui_max_stdouterr_bytes 🔗

Use with: common

The maximum size of the stdout / stderr files that will be printed to the console. -1 implies no limit.

--experimental_ui_max_stdouterr_bytes

Allows multiple
False
Documentation category
execution_strategy
Option effect tags
execution

--experimental_unsupported_and_brittle_include_scanning 🔗

Use with: configuration

Whether to narrow inputs to C/C++ compilation by parsing #include lines from input files. This can improve performance and incrementality by decreasing the size of compilation input trees. However, it can also break builds because the include scanner does not fully implement C preprocessor semantics. In particular, it does not understand dynamic #include directives and ignores preprocessor conditional logic. Use at your own risk. Any issues relating to this flag that are filed will be closed.

--[no]experimental_unsupported_and_brittle_include_scanning

Allows multiple
False
Documentation category
build_time_optimization
Option effect tags
loading_and_analysisexecutionchanges_inputs

--experimental_use_cpp_compile_action_args_params_file 🔗

Use with: configuration

If enabled, write CppCompileAction exposed action.args to parameters file.

--[no]experimental_use_cpp_compile_action_args_params_file

Allows multiple
False
Documentation category
undocumented
Option effect tags
bazel_internal_configuration
Option metadata tags
experimental

--experimental_use_dex_splitter_for_incremental_dexing 🔗

Use with: configuration

Do not use.

--[no]experimental_use_dex_splitter_for_incremental_dexing

Allows multiple
False
Documentation category
undocumented
Option effect tags
loading_and_analysis
Option metadata tags
experimental

--experimental_use_event_based_build_completion_status 🔗

Use with: common

No-op

--[no]experimental_use_event_based_build_completion_status

Allows multiple
False
Documentation category
undocumented
Option effect tags
loading_and_analysisexecution
Option metadata tags
experimental

--experimental_use_fork_join_pool 🔗

Use with: common

No-op.

--[no]experimental_use_fork_join_pool

Allows multiple
False
Documentation category
undocumented
Option effect tags
no_op
Option metadata tags
deprecated

--experimental_use_hermetic_linux_sandbox 🔗

Use with: build

If set to true, do not mount root, only mount whats provided with sandbox_add_mount_pair. Input files will be hardlinked to the sandbox instead of symlinked to from the sandbox. If action input files are located on a filesystem different from the sandbox, then the input files will be copied instead.

--[no]experimental_use_hermetic_linux_sandbox

Allows multiple
False
Documentation category
execution_strategy
Option effect tags
execution

--experimental_use_llvm_covmap 🔗

Use with: configuration

If specified, Bazel will generate llvm-cov coverage map information rather than gcov when collect_code_coverage is enabled.

--[no]experimental_use_llvm_covmap

Allows multiple
False
Documentation category
output_parameters
Option effect tags
changes_inputsaffects_outputsloading_and_analysis
Option metadata tags
experimental

--experimental_use_platforms_in_output_dir_legacy_heuristic 🔗

Use with: configuration

Please only use this flag as part of a suggested migration or testing strategy. Note that the heuristic has known deficiencies and it is suggested to migrate to relying on just --experimental_override_name_platform_in_output_dir.

--[no]experimental_use_platforms_in_output_dir_legacy_heuristic

Allows multiple
False
Documentation category
output_parameters
Option effect tags
affects_outputs
Option metadata tags
experimental

--experimental_use_priority_in_analysis 🔗

Use with: common

No-op.

--[no]experimental_use_priority_in_analysis

Allows multiple
False
Documentation category
undocumented
Option effect tags
no_op
Option metadata tags
deprecated

--experimental_use_rtxt_from_merged_resources 🔗

Use with: configuration

Use R.txt from the merging action, instead of from the validation action.

--[no]experimental_use_rtxt_from_merged_resources

Allows multiple
False
Documentation category
undocumented
Option effect tags
changes_inputs

--experimental_use_scheduling_middlemen 🔗

Use with: build

Deprecated. No-op.

--[no]experimental_use_scheduling_middlemen

Allows multiple
False
Documentation category
undocumented
Option effect tags
bazel_internal_configurationaffects_outputsloading_and_analysis

--experimental_use_semaphore_for_jobs 🔗

Use with: build

If set to true, additionally use semaphore to limit number of concurrent jobs.

--[no]experimental_use_semaphore_for_jobs

Allows multiple
False
Documentation category
execution_strategy
Option effect tags
host_machine_resource_optimizationsexecution

--experimental_use_validation_aspect 🔗

Use with: build

Whether to run validation actions using aspect (for parallelism with tests).

--[no]experimental_use_validation_aspect

Allows multiple
False
Documentation category
output_selection
Option effect tags
executionaffects_outputs

--experimental_use_windows_sandbox 🔗

Use with: build

Use Windows sandbox to run actions. If "yes", the binary provided by --experimental_windows_sandbox_path must be valid and correspond to a supported version of sandboxfs. If "auto", the binary may be missing or not compatible.

--[no]experimental_use_windows_sandbox

Allows multiple
False
Documentation category
execution_strategy
Option effect tags
execution

--experimental_windows_sandbox_path 🔗

Use with: build

Path to the Windows sandbox binary to use when --experimental_use_windows_sandbox is true. If a bare name, use the first binary of that name found in the PATH.

--experimental_windows_sandbox_path

Allows multiple
False
Documentation category
execution_strategy
Option effect tags
execution

--experimental_windows_watchfs 🔗

Use with: common

If true, experimental Windows support for --watchfs is enabled. Otherwise --watchfsis a non-op on Windows. Make sure to also enable --watchfs.

--[no]experimental_windows_watchfs

Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown

--experimental_worker_allowlist 🔗

Use with: build

If non-empty, only allow using persistent workers with the given worker key mnemonic.

--experimental_worker_allowlist

Allows multiple
False
Documentation category
execution_strategy
Option effect tags
executionhost_machine_resource_optimizations

--experimental_worker_as_resource 🔗

Use with: build

No-op, will be removed soon.

--[no]experimental_worker_as_resource

Allows multiple
False
Documentation category
execution_strategy
Option effect tags
no_op

--experimental_worker_cancellation 🔗

Use with: build

If enabled, Bazel may send cancellation requests to workers that support them.

--[no]experimental_worker_cancellation

Allows multiple
False
Documentation category
execution_strategy
Option effect tags
execution

--experimental_worker_for_repo_fetching 🔗

Use with: common

The threading mode to use for repo fetching. If set to 'off', no worker thread is used, and the repo fetching is subject to restarts. Otherwise, uses a platform thread (i.e. OS thread) if set to 'platform' or a virtual thread if set to 'virtual'.

--experimental_worker_for_repo_fetching

Allows multiple
False
Documentation category
remote
Option effect tags
unknown

--experimental_worker_memory_limit_mb 🔗

Use with: build

If this limit is greater than zero, workers might be killed if the memory usage of the worker exceeds the limit. If not used together with dynamic execution and `--experimental_dynamic_ignore_local_signals=9`, this may crash your build.

--experimental_worker_memory_limit_mb

Allows multiple
False
Documentation category
execution_strategy
Option effect tags
executionhost_machine_resource_optimizations

--experimental_worker_metrics_poll_interval 🔗

Use with: build

The interval between collecting worker metrics and possibly attempting evictions. Cannot effectively be less than 1s for performance reasons.

--experimental_worker_metrics_poll_interval

Allows multiple
False
Documentation category
execution_strategy
Option effect tags
executionhost_machine_resource_optimizations

--experimental_worker_multiplex_sandboxing 🔗

Use with: build

If enabled, multiplex workers will be sandboxed, using a separate sandbox directory per work request. Only workers that have the 'supports-multiplex-sandboxing' execution requirement will be sandboxed.

--[no]experimental_worker_multiplex_sandboxing

Allows multiple
False
Documentation category
execution_strategy
Option effect tags
execution

--experimental_worker_sandbox_hardening 🔗

Use with: build

If enabled, workers are run in a hardened sandbox, if the implementation allows it.

--[no]experimental_worker_sandbox_hardening

Allows multiple
False
Documentation category
execution_strategy
Option effect tags
execution

--experimental_worker_strict_flagfiles 🔗

Use with: build

If enabled, actions arguments for workers that do not follow the worker specification will cause an error. Worker arguments must have exactly one @flagfile argument as the last of its list of arguments.

--[no]experimental_worker_strict_flagfiles

Allows multiple
False
Documentation category
execution_strategy
Option effect tags
execution

--experimental_workspace_rules_log_file 🔗

Use with: common

Log certain Workspace Rules events into this file as delimited WorkspaceEvent protos.

--experimental_workspace_rules_log_file

Allows multiple
False
Documentation category
logging
Option effect tags
unknown

--experimental_writable_outputs 🔗

Use with: configuration

If true, the file permissions of action outputs are set to 0755 instead of 0555

--[no]experimental_writable_outputs

Allows multiple
False
Documentation category
undocumented
Option effect tags
bazel_internal_configuration
Option metadata tags
experimental

--explain 🔗

Use with: build

Causes the build system to explain each executed step of the build. The explanation is written to the specified log file.

--explain

Allows multiple
False
Documentation category
logging
Option effect tags
affects_outputs

--explicit_java_test_deps 🔗

Use with: configuration

Explicitly specify a dependency to JUnit or Hamcrest in a java_test instead of accidentally obtaining from the TestRunner's deps. Only works for bazel right now.

--[no]explicit_java_test_deps

Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown

--expunge 🔗

Use with: clean

If true, clean removes the entire working tree for this bazel instance, which includes all bazel-created temporary and build output files, and stops the bazel server if it is running.

--[no]expunge

Allows multiple
False
Documentation category
output_selection
Option effect tags
host_machine_resource_optimizations

--expunge_async 🔗

Use with: clean

If specified, clean asynchronously removes the entire working tree for this bazel instance, which includes all bazel-created temporary and build output files, and stops the bazel server if it is running. 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.

--expunge_async

Allows multiple
False
Documentation category
output_selection
Expands to
--expunge
--async
Option effect tags
host_machine_resource_optimizations

--extension_filter 🔗

Use with: mod

Only display the usages of these module extensions and the repos generated by them if their respective flags are set. If set, the result graph will only include paths that contain modules using the specified extensions. An empty list disables the filter, effectively specifying all possible extensions.

--extension_filter

Allows multiple
False
Documentation category
mod_command
Option effect tags
terminal_output

--extension_info 🔗

Use with: mod

Specify how much detail about extension usages to include in the query result. "Usages" will only show the extensions names, "repos" will also include repos imported with use_repo, and "all" will also show the other repositories generated by extensions.

--extension_info

Allows multiple
False
Documentation category
mod_command
Option effect tags
terminal_output

--extension_usages 🔗

Use with: mod

Specify modules whose extension usages will be displayed in the show_extension query.

--extension_usages

Allows multiple
False
Documentation category
mod_command
Option effect tags
terminal_output

--extra_execution_platforms 🔗

Use with: configuration

The platforms that are available as execution platforms to run actions. Platforms can be specified by exact target, or as a target pattern. These platforms will be considered before those declared in the WORKSPACE file by register_execution_platforms(). This option may only be set once; later instances will override earlier flag settings.

--extra_execution_platforms

Allows multiple
False
Documentation category
toolchain
Option effect tags
execution

--extra_toolchains 🔗

Use with: configuration

The toolchain rules to be considered during toolchain resolution. Toolchains can be specified by exact target, or as a target pattern. These toolchains will be considered before those declared in the WORKSPACE file by register_toolchains().

--extra_toolchains

Allows multiple
True
Documentation category
toolchain
Option effect tags
affects_outputschanges_inputsloading_and_analysis

--failure_detail_out 🔗

Use with: startup

If set, 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.

--failure_detail_out=<path>

Allows multiple
False
Documentation category
bazel_client_options
Option effect tags
affects_outputsloses_incremental_state

--fat_apk_cpu 🔗

Use with: configuration

Setting this option enables fat APKs, which contain native binaries for all specified target architectures, e.g., --fat_apk_cpu=x86,armeabi-v7a. If this flag is specified, then --android_cpu is ignored for dependencies of android_binary rules.

--fat_apk_cpu

Allows multiple
False
Documentation category
output_parameters
Option effect tags
affects_outputsloading_and_analysisloses_incremental_state

--fat_apk_hwasan 🔗

Use with: configuration

Whether to create HWASAN splits.

--[no]fat_apk_hwasan

Allows multiple
False
Documentation category
output_parameters
Option effect tags
affects_outputsloading_and_analysisloses_incremental_state

--fatal_event_bus_exceptions 🔗

Use with: startup

Whether or not to exit if an exception is thrown by an internal EventBus handler. No-op if --fatal_async_exceptions_exclusions is available; that flag's behavior is preferentially used.

--[no]fatal_event_bus_exceptions

Allows multiple
False
Deprecation warning
Will be enabled by default and removed soon
Documentation category
undocumented
Option effect tags
eagerness_to_exitloses_incremental_state

--fdo_instrument 🔗

Use with: configuration

Generate binaries with FDO instrumentation. With Clang/LLVM compiler, it also accepts the directory name under which the raw profile file(s) will be dumped at runtime.

--fdo_instrument

Allows multiple
False
Documentation category
output_parameters
Implicit requirements
--copt=-Wno-error
Option effect tags
affects_outputs

--fdo_optimize 🔗

Use with: configuration

Use FDO profile information to optimize compilation. Specify the name of a zip file containing a .gcda file tree, an afdo file containing an auto profile, or an LLVM profile file. This flag also accepts files specified as labels (e.g. `//foo/bar:file.afdo` - you may need to add an `exports_files` directive to the corresponding package) and labels pointing to `fdo_profile` targets. This flag will be superseded by the `fdo_profile` rule.

--fdo_optimize

Allows multiple
False
Documentation category
output_parameters
Option effect tags
affects_outputs

--fdo_prefetch_hints 🔗

Use with: configuration

Use cache prefetch hints.

--fdo_prefetch_hints

Allows multiple
False
Documentation category
output_parameters
Option effect tags
affects_outputs

--fdo_profile 🔗

Use with: configuration

The fdo_profile representing the profile to be used for optimization.

--fdo_profile

Allows multiple
False
Documentation category
output_parameters
Option effect tags
affects_outputs

--features 🔗

Use with: configuration

The given features will be enabled or disabled by default for targets built in the target configuration. Specifying -<feature> will disable the feature. Negative features always override positive ones. See also --host_features

--features

Allows multiple
True
Documentation category
output_parameters
Option effect tags
changes_inputsaffects_outputs

--fetch 🔗

Use with: buildcanonicalize-flagsfetchmodquerysync

Allows the command to fetch external dependencies

--[no]fetch

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown

--fission 🔗

Use with: configuration

Specifies which compilation modes use fission for C++ compilations and links. May be any combination of {'fastbuild', 'dbg', 'opt'} or the special values 'yes' to enable all modes and 'no' to disable all modes.

--fission

Allows multiple
False
Documentation category
output_selection
Option effect tags
loading_and_analysisaction_command_linesaffects_outputs

--flag_alias 🔗

Use with: configuration

Sets a shorthand name for a Starlark flag. It takes a single key-value pair in the form "<key>=<value>" as an argument.

--flag_alias

Allows multiple
True
Documentation category
generic_inputs
Option effect tags
changes_inputs

--flaky_test_attempts 🔗

Use with: build

Each test will be retried up to the specified number of times in case of any test failure. Tests that required more than one attempt to pass are marked as 'FLAKY' in the test summary. Normally the value specified is just an integer or the string 'default'. If an integer, then all tests will be run up to N times. If 'default', then only a single test attempt will be made for regular tests and three for tests marked explicitly as flaky by their rule (flaky=1 attribute). Alternate syntax: regex_filter@flaky_test_attempts. Where flaky_test_attempts is as above and regex_filter stands for a list of include and exclude regular expression patterns (Also see --runs_per_test). Example: --flaky_test_attempts=//foo/.*,-//foo/bar/.*@3 deflakes all tests in //foo/ except those under foo/bar three times. This option can be passed multiple times. The most recently passed argument that matches takes precedence. If nothing matches, behavior is as if 'default' above.

--flaky_test_attempts

Allows multiple
True
Documentation category
testing
Option effect tags
execution

--for_command 🔗

Use with: canonicalize-flags

The command for which the options should be canonicalized.

--for_command

Allows multiple
False
Documentation category
generic_inputs
Option effect tags
affects_outputsterminal_output

--force 🔗

Use with: fetch

Ignore existing repository if any and force fetch the repository again. Only works when --enable_bzlmod is on.

--[no]force

Allows multiple
False
Documentation category
execution_strategy
Option effect tags
changes_inputs

--force_ignore_dash_static 🔗

Use with: build

noop

--[no]force_ignore_dash_static

Allows multiple
False
Documentation category
undocumented
Option effect tags
loading_and_analysisaffects_outputs

--force_pic 🔗

Use with: configuration

If enabled, all C++ compilations produce position-independent code ("-fPIC"), links prefer PIC pre-built libraries over non-PIC libraries, and links produce position-independent executables ("-pie").

--[no]force_pic

Allows multiple
False
Documentation category
output_parameters
Option effect tags
loading_and_analysisaffects_outputs

--force_python 🔗

Use with: configuration

No-op, will be removed soon.

--force_python

Allows multiple
False
Documentation category
undocumented
Option effect tags
loading_and_analysisaffects_outputs

--from 🔗

Use with: mod

The module(s) starting from which the dependency graph query will be displayed. Check each query?s description for the exact semantics. Defaults to <root>.

--from

Allows multiple
False
Documentation category
mod_command
Option effect tags
terminal_output

--gc_thrashing_limits 🔗

Use with: common

Limits which, if reached, cause GcThrashingDetector to crash Bazel with an OOM. Each limit is specified as <period>:<count> where period is a duration and count is a positive integer. If more than --gc_thrashing_threshold percent of tenured space (old gen heap) remains occupied after <count> consecutive full GCs within <period>, an OOM is triggered. Multiple limits can be specified separated by commas.

--gc_thrashing_limits

Old name
--experimental_gc_thrashing_limits
Warn old name
False
Allows multiple
False
Documentation category
build_time_optimization
Option effect tags
host_machine_resource_optimizations

--gc_thrashing_threshold 🔗

Use with: common

The percent of tenured space occupied (0-100) above which GcThrashingDetector considers memory pressure events against its limits (--gc_thrashing_limits). If set to 100, GcThrashingDetector is disabled.

--gc_thrashing_threshold

Old name
--experimental_oom_more_eagerly_threshold
Warn old name
False
Allows multiple
False
Documentation category
execution_strategy
Option effect tags
host_machine_resource_optimizations

--generate_json_trace_profile 🔗

Use with: common

If enabled, Bazel profiles the build and writes a JSON-format profile into a file in the output base. View profile by loading into chrome://tracing. By default Bazel writes the profile for all build-like commands and query.

--[no]generate_json_trace_profile

Old name
--[no]experimental_generate_json_trace_profile
Warn old name
True
Allows multiple
False
Documentation category
logging
Option effect tags
bazel_monitoring

--genrule_strategy 🔗

Use with: build

Specify how to execute genrules. This flag will be phased out. Instead, use --spawn_strategy=<value> to control all actions or --strategy=Genrule=<value> to control genrules only.

--genrule_strategy

Allows multiple
False
Documentation category
execution_strategy
Option effect tags
execution

--glibc 🔗

Use with: build

Deprecated no-op.

--glibc

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown
Option metadata tags
deprecated

--gnu_format 🔗

Use with: version

If set, write the version to stdout using the conventions described in the GNU standards.

--[no]gnu_format

Allows multiple
False
Documentation category
output_parameters
Option effect tags
affects_outputsexecution

--google_auth_scopes 🔗

Use with: common

A comma-separated list of Google Cloud authentication scopes.

--google_auth_scopes

Old name
--auth_scope
Warn old name
True
Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown

--google_credentials 🔗

Use with: common

Specifies the file to get authentication credentials from. See https://cloud.google.com/docs/authentication for details.

--google_credentials

Old name
--auth_credentials
Warn old name
True
Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown

--google_default_credentials 🔗

Use with: common

Whether to use 'Google Application Default Credentials' for authentication. See https://cloud.google.com/docs/authentication for details. Disabled by default.

--[no]google_default_credentials

Old name
--[no]auth_enabled
Warn old name
True
Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown

--graph:conditional_edges_limit 🔗

Use with: query

The maximum number of condition labels to show. -1 means no truncation and 0 means no annotation. This option is only applicable to --output=graph.

--graph:conditional_edges_limit

Allows multiple
False
Documentation category
query
Option effect tags
terminal_output

--graph:factored 🔗

Use with: aquerycqueryquery

If true, then the graph will be emitted 'factored', i.e. topologically-equivalent nodes will be merged together and their labels concatenated. This option is only applicable to --output=graph.

--[no]graph:factored

Allows multiple
False
Documentation category
query
Option effect tags
terminal_output

--graph:node_limit 🔗

Use with: aquerycqueryquery

The maximum length of the label string for a graph node in the output. Longer labels will be truncated; -1 means no truncation. This option is only applicable to --output=graph.

--graph:node_limit

Allows multiple
False
Documentation category
query
Option effect tags
terminal_output

--grpc_keepalive_time 🔗

Use with: common

Configures keep-alive pings for outgoing gRPC connections. If this is set, then Bazel sends pings after this much time of no read operations on the connection, but only if there is at least one pending gRPC call. Times are treated as second granularity; it is an error to set a value less than one second. By default, keep-alive pings are disabled. You should coordinate with the service owner before enabling this setting. For example to set a value of 30 seconds to this flag, it should be done as this --grpc_keepalive_time=30s

--grpc_keepalive_time

Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown

--grpc_keepalive_timeout 🔗

Use with: common

Configures a keep-alive timeout for outgoing gRPC connections. If keep-alive pings are enabled with --grpc_keepalive_time, then Bazel times out a connection if it does not receive a ping reply after this much time. Times are treated as second granularity; it is an error to set a value less than one second. If keep-alive pings are disabled, then this setting is ignored.

--grpc_keepalive_timeout

Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown

--grte_top 🔗

Use with: configuration

A label to a checked-in libc library. The default value is selected by the crosstool toolchain, and you almost never need to override it.

--grte_top

Allows multiple
False
Documentation category
toolchain
Option effect tags
action_command_linesaffects_outputs

--heap_dump_on_oom 🔗

Use with: common

Whether to manually output a heap dump if an OOM is thrown (including manual OOMs due to reaching --gc_thrashing_limits). The dump will be written to <output_base>/<invocation_id>.heapdump.hprof. This option effectively replaces -XX:+HeapDumpOnOutOfMemoryError, which has no effect for manual OOMs.

--[no]heap_dump_on_oom

Allows multiple
False
Documentation category
logging
Option effect tags
bazel_monitoring

--help_verbosity 🔗

Use with: help

Select the verbosity of the help command.

--help_verbosity

Allows multiple
False
Documentation category
logging
Option effect tags
terminal_output

--heuristically_drop_nodes 🔗

Use with: common

If true, Blaze will remove FileState and DirectoryListingState nodes after related File and DirectoryListing node is done to save memory. We expect that it is less likely that these nodes will be needed again. If so, the program will re-evaluate them.

--[no]heuristically_drop_nodes

Old name
--[no]experimental_heuristically_drop_nodes
Warn old name
False
Allows multiple
False
Documentation category
build_time_optimization
Option effect tags
loses_incremental_state

--high_priority_workers 🔗

Use with: build

No-op, will be removed soon.

--high_priority_workers

Allows multiple
True
Documentation category
execution_strategy
Option effect tags
execution

--home_rc 🔗

Use with: startup

Whether or not to look for the home bazelrc file at $HOME/.bazelrc

--[no]home_rc

Allows multiple
False
Documentation category
bazel_client_options
Option effect tags
changes_inputs

--host_action_env 🔗

Use with: configuration

Specifies the set of environment variables available to actions with execution configurations. 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.

--host_action_env

Allows multiple
True
Documentation category
output_parameters
Option effect tags
action_command_lines

--host_compilation_mode 🔗

Use with: configuration

Specify the mode the tools used during the build will be built in. Values: 'fastbuild', 'dbg', 'opt'.

--host_compilation_mode

Allows multiple
False
Documentation category
output_parameters
Option effect tags
affects_outputsaction_command_lines

--host_compiler 🔗

Use with: configuration

No-op flag. Will be removed in a future release.

--host_compiler

Allows multiple
False
Documentation category
toolchain
Option effect tags
loading_and_analysisexecution

--host_conlyopt 🔗

Use with: configuration

Additional option to pass to the C compiler when compiling C (but not C++) source files in the exec configurations.

--host_conlyopt

Allows multiple
True
Documentation category
output_parameters
Option effect tags
action_command_linesaffects_outputs

--host_copt 🔗

Use with: configuration

Additional options to pass to the C compiler for tools built in the exec configurations.

--host_copt

Allows multiple
True
Documentation category
output_parameters
Option effect tags
action_command_linesaffects_outputs

--host_cpu 🔗

Use with: configuration

The host CPU.

--host_cpu

Allows multiple
False
Documentation category
output_parameters
Option effect tags
changes_inputsaffects_outputs

--host_crosstool_top 🔗

Use with: configuration

No-op flag. Will be removed in a future release.

--host_crosstool_top

Allows multiple
False
Documentation category
undocumented
Option effect tags
no_op

--host_cxxopt 🔗

Use with: configuration

Additional options to pass to C++ compiler for tools built in the exec configurations.

--host_cxxopt

Allows multiple
True
Documentation category
output_parameters
Option effect tags
action_command_linesaffects_outputs

--host_features 🔗

Use with: configuration

The given features will be enabled or disabled by default for targets built in the exec configuration. Specifying -<feature> will disable the feature. Negative features always override positive ones.

--host_features

Allows multiple
True
Documentation category
output_parameters
Option effect tags
changes_inputsaffects_outputs

--host_force_python 🔗

Use with: configuration

Overrides the Python version for the exec configuration. Can be "PY2" or "PY3".

--host_force_python

Allows multiple
False
Documentation category
output_parameters
Option effect tags
loading_and_analysisaffects_outputs

--host_grte_top 🔗

Use with: configuration

If specified, this setting overrides the libc top-level directory (--grte_top) for the exec configuration.

--host_grte_top

Allows multiple
False
Documentation category
toolchain
Option effect tags
action_command_linesaffects_outputs

--host_java_launcher 🔗

Use with: configuration

The Java launcher used by tools that are executed during a build.

--host_java_launcher

Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown

--host_java_toolchain 🔗

Use with: configuration

No-op. Kept here for backwards compatibility.

--host_java_toolchain

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown

--host_javabase 🔗

Use with: configuration

No-op. Kept here for backwards compatibility.

--host_javabase

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown

--host_javacopt 🔗

Use with: configuration

Additional options to pass to javac when building tools that are executed during a build.

--host_javacopt

Allows multiple
True
Documentation category
uncategorized
Option effect tags
unknown

--host_jvm_args 🔗

Use with: startup

Flags to pass to the JVM executing Blaze.

--host_jvm_args=<jvm_arg>

Allows multiple
True
Documentation category
uncategorized
Option effect tags
unknown

--host_jvm_debug 🔗

Use with: startup

Convenience option to add some additional JVM startup flags, which cause the JVM to wait during startup until you connect from a JDWP-compliant debugger (like Eclipse) to port 5005.

--host_jvm_debug

Allows multiple
False
Documentation category
uncategorized
Expands to
--host_jvm_args=-Xdebug
--host_jvm_args=-Xrunjdwp:transport=dt_socket,server=y,address=5005
Option effect tags
unknown

--host_jvm_profile 🔗

Use with: startup

Convenience option to add some profiler/debugger-specific JVM startup flags. Bazel has a list of known values that it maps to hard-coded JVM startup flags, possibly searching some hardcoded paths for certain files.

--host_jvm_profile=<profiler_name>

Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown

--host_jvmopt 🔗

Use with: configuration

Additional options to pass to the Java VM when building tools that are executed during the build. These options will get added to the VM startup options of each java_binary target.

--host_jvmopt

Allows multiple
True
Documentation category
uncategorized
Option effect tags
unknown

--host_linkopt 🔗

Use with: configuration

Additional option to pass to linker when linking tools in the exec configurations.

--host_linkopt

Allows multiple
True
Documentation category
output_parameters
Option effect tags
action_command_linesaffects_outputs

--host_macos_minimum_os 🔗

Use with: configuration

Minimum compatible macOS version for host targets. If unspecified, uses 'macos_sdk_version'.

--host_macos_minimum_os

Allows multiple
False
Documentation category
output_parameters
Option effect tags
loses_incremental_state

--host_per_file_copt 🔗

Use with: configuration

Additional options to selectively pass to the C/C++ compiler when compiling certain files in the exec configurations. This option can be passed multiple times. Syntax: regex_filter@option_1,option_2,...,option_n. Where regex_filter stands for a list of include and exclude regular expression patterns (Also see --instrumentation_filter). option_1 to option_n stand for arbitrary command line options. If an option contains a comma it has to be quoted with a backslash. Options can contain @. Only the first @ is used to split the string. Example: --host_per_file_copt=//foo/.*\.cc,-//foo/bar\.cc@-O0 adds the -O0 command line option to the gcc command line of all cc files in //foo/ except bar.cc.

--host_per_file_copt

Allows multiple
True
Documentation category
output_parameters
Option effect tags
action_command_linesaffects_outputs

--host_platform 🔗

Use with: configuration

The label of a platform rule that describes the host system.

--host_platform

Old name
--experimental_host_platform
Warn old name
True
Allows multiple
False
Documentation category
toolchain
Option effect tags
affects_outputschanges_inputsloading_and_analysis

--http_connector_attempts 🔗

Use with: common

The maximum number of attempts for http downloads.

--http_connector_attempts

Allows multiple
False
Documentation category
bazel_client_options
Option effect tags
bazel_internal_configuration

--http_connector_retry_max_timeout 🔗

Use with: common

The maximum timeout for http download retries. With a value of 0, no timeout maximum is defined.

--http_connector_retry_max_timeout

Allows multiple
False
Documentation category
bazel_client_options
Option effect tags
bazel_internal_configuration

--http_timeout_scaling 🔗

Use with: common

Scale all timeouts related to http downloads by the given factor

--http_timeout_scaling

Allows multiple
False
Documentation category
bazel_client_options
Option effect tags
bazel_internal_configuration

--idle_server_tasks 🔗

Use with: startup

Run System.gc() when the server is idle

--[no]idle_server_tasks

Allows multiple
False
Documentation category
bazel_client_options
Option effect tags
loses_incremental_statehost_machine_resource_optimizations

--iff_heap_size_greater_than 🔗

Use with: shutdown

Iff non-zero, then shutdown will only shut down the server if the total memory (in MB) consumed by the JVM exceeds this value.

--iff_heap_size_greater_than

Allows multiple
False
Documentation category
output_selection
Option effect tags
loses_incremental_stateeagerness_to_exit

--ignore_all_rc_files 🔗

Use with: startup

Disables all rc files, regardless of the values of other rc-modifying flags, even if these flags come later in the list of startup options.

--[no]ignore_all_rc_files

Allows multiple
False
Documentation category
bazel_client_options
Option effect tags
changes_inputs

--ignore_dev_dependency 🔗

Use with: common

If true, Bazel ignores `bazel_dep` and `use_extension` declared as `dev_dependency` in the MODULE.bazel of the root module. Note that, those dev dependencies are always ignored in the MODULE.bazel if it's not the root module regardless of the value of this flag.

--[no]ignore_dev_dependency

Allows multiple
False
Documentation category
bzlmod
Option effect tags
loading_and_analysis

--ignore_unsupported_sandboxing 🔗

Use with: build

Do not print a warning when sandboxed execution is not supported on this system.

--[no]ignore_unsupported_sandboxing

Allows multiple
False
Documentation category
logging
Option effect tags
terminal_output

--implicit_deps 🔗

Use with: aquerycqueryquery

If enabled, implicit dependencies will be included in the dependency graph over which the query operates. An implicit dependency is one that is not explicitly specified in the BUILD file but added by bazel. For cquery, this option controls filtering resolved toolchains.

--[no]implicit_deps

Allows multiple
False
Documentation category
query
Option effect tags
build_file_semantics

--include_artifacts 🔗

Use with: aquery

Includes names of the action inputs and outputs in the output (potentially large).

--[no]include_artifacts

Allows multiple
False
Documentation category
query
Option effect tags
terminal_output

--include_aspects 🔗

Use with: aquerycqueryquery

aquery, cquery: whether to include aspect-generated actions in the output. query: no-op (aspects are always followed).

--[no]include_aspects

Allows multiple
False
Documentation category
query
Option effect tags
terminal_output

--include_builtin 🔗

Use with: mod

Include built-in modules in the dependency graph. Disabled by default because it is quite noisy.

--[no]include_builtin

Allows multiple
False
Documentation category
mod_command
Option effect tags
terminal_output

--include_commandline 🔗

Use with: aquery

Includes the content of the action command lines in the output (potentially large).

--[no]include_commandline

Allows multiple
False
Documentation category
query
Option effect tags
terminal_output

--include_file_write_contents 🔗

Use with: aquery

Include the file contents for the FileWrite, SourceSymlinkManifest, and RepoMappingManifest actions (potentially large).

--[no]include_file_write_contents

Allows multiple
False
Documentation category
query
Option effect tags
terminal_output

--include_param_files 🔗

Use with: aquery

Include the content of the param files used in the command (potentially large). Note: Enabling this flag will automatically enable the --include_commandline flag.

--[no]include_param_files

Allows multiple
False
Documentation category
query
Option effect tags
terminal_output

--include_scheduling_dependencies 🔗

Use with: aquery

Includes names of the scheduling dependencies of actions (potentially large). Only takes effect if --include_artifacts is also set.

--[no]include_scheduling_dependencies

Allows multiple
False
Documentation category
query
Option effect tags
terminal_output

--include_unused 🔗

Use with: mod

The queries will also take into account and display the unused modules, which are not present in the module resolution graph after selection (due to the Minimal-Version Selection or override rules). This can have different effects for each of the query types i.e. include new paths in the all_paths command, or extra dependants in the explain command.

--[no]include_unused

Allows multiple
False
Documentation category
mod_command
Option effect tags
terminal_output

--incompatible_allow_python_version_transitions 🔗

Use with: configuration

No-op, will be removed soon.

--[no]incompatible_allow_python_version_transitions

Allows multiple
False
Documentation category
undocumented
Option effect tags
loading_and_analysis
Option metadata tags
incompatible_change

--incompatible_allow_tags_propagation 🔗

Use with: common

If set to true, tags will be propagated from a target to the actions' execution requirements; otherwise tags are not propagated. See https://github.com/bazelbuild/bazel/issues/8830 for details.

--[no]incompatible_allow_tags_propagation

Old name
--[no]experimental_allow_tags_propagation
Warn old name
True
Allows multiple
False
Documentation category
starlark_semantics
Option effect tags
build_file_semantics
Option metadata tags
experimental

--incompatible_always_check_depset_elements 🔗

Use with: common

Check the validity of elements added to depsets, in all constructors. Elements must be immutable, but historically the depset(direct=...) constructor forgot to check. Use tuples instead of lists in depset elements. See https://github.com/bazelbuild/bazel/issues/10313 for details.

--[no]incompatible_always_check_depset_elements

Allows multiple
False
Documentation category
starlark_semantics
Option effect tags
build_file_semantics
Option metadata tags
incompatible_change

--incompatible_always_include_files_in_data 🔗

Use with: configuration

If true, native rules add <code>DefaultInfo.files</code> of data dependencies to their runfiles, which matches the recommended behavior for Starlark rules (https://bazel.build/extending/rules#runfiles_features_to_avoid).

--[no]incompatible_always_include_files_in_data

Allows multiple
False
Documentation category
output_selection
Option effect tags
affects_outputs
Option metadata tags
incompatible_change

--incompatible_android_platforms_transition_updated_affected 🔗

Use with: configuration

If set to true, the AndroidPlatformsTransition will also update `affected by Starlark transition` with changed options to avoid potential action conflicts.

--[no]incompatible_android_platforms_transition_updated_affected

Allows multiple
False
Documentation category
undocumented
Option effect tags
loading_and_analysis
Option metadata tags
incompatible_change

--incompatible_auto_configure_host_platform 🔗

Use with: build

This option is deprecated and has no effect.

--[no]incompatible_auto_configure_host_platform

Allows multiple
False
Documentation category
undocumented
Option effect tags
loading_and_analysis
Option metadata tags
incompatible_change

--incompatible_auto_exec_groups 🔗

Use with: configuration

When enabled, an exec groups is automatically created for each toolchain used by a rule. For this to work rule needs to specify `toolchain` parameter on its actions. For more information, see https://github.com/bazelbuild/bazel/issues/17134.

--[no]incompatible_auto_exec_groups

Allows multiple
False
Documentation category
output_parameters
Option effect tags
affects_outputs
Option metadata tags
incompatible_change

--incompatible_avoid_hardcoded_objc_compilation_flags 🔗

Use with: configuration

Prevents Bazel from adding compiler options to Objective-C compilation actions. Options set in the crosstool are still applied.

--[no]incompatible_avoid_hardcoded_objc_compilation_flags

Allows multiple
False
Documentation category
undocumented
Option effect tags
affects_outputsbazel_internal_configurationexecutionaction_command_lines
Option metadata tags
incompatible_change

--incompatible_cc_coverage 🔗

Use with: build

Obsolete, no effect.

--[no]incompatible_cc_coverage

Old name
--[no]experimental_cc_coverage
Warn old name
True
Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown
Option metadata tags
incompatible_changedeprecated

--incompatible_check_sharding_support 🔗

Use with: configuration

If true, Bazel will fail a sharded test if the test runner does not indicate that it supports sharding by touching the file at the path in TEST_SHARD_STATUS_FILE. If false, a test runner that does not support sharding will lead to all tests running in each shard.

--[no]incompatible_check_sharding_support

Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown
Option metadata tags
incompatible_change

--incompatible_check_testonly_for_output_files 🔗

Use with: configuration

If enabled, check testonly for prerequisite targets that are output files by looking up the testonly of the generating rule. This matches visibility checking.

--[no]incompatible_check_testonly_for_output_files

Allows multiple
False
Documentation category
input_strictness
Option effect tags
build_file_semantics
Option metadata tags
incompatible_change

--incompatible_check_visibility_for_toolchains 🔗

Use with: configuration

If enabled, visibility checking also applies to toolchain implementations.

--[no]incompatible_check_visibility_for_toolchains

Allows multiple
False
Documentation category
input_strictness
Option effect tags
build_file_semantics
Option metadata tags
incompatible_change

--incompatible_config_setting_private_default_visibility 🔗

Use with: buildcanonicalize-flagsfetchmodquerysync

If incompatible_enforce_config_setting_visibility=false, this is a noop. Else, if this flag is false, any config_setting without an explicit visibility attribute is //visibility:public. If this flag is true, config_setting follows the same visibility logic as all other rules. See https://github.com/bazelbuild/bazel/issues/12933.

--[no]incompatible_config_setting_private_default_visibility

Allows multiple
False
Documentation category
starlark_semantics
Option effect tags
loading_and_analysis
Option metadata tags
incompatible_change

--incompatible_default_to_explicit_init_py 🔗

Use with: configuration

This flag changes the default behavior so that __init__.py files are no longer automatically created in the runfiles of Python targets. Precisely, when a py_binary or py_test target has legacy_create_init set to "auto" (the default), it is treated as false if and only if this flag is set. See https://github.com/bazelbuild/bazel/issues/10076.

--[no]incompatible_default_to_explicit_init_py

Allows multiple
False
Documentation category
generic_inputs
Option effect tags
affects_outputs
Option metadata tags
incompatible_change

--incompatible_depset_for_java_output_source_jars 🔗

Use with: common

No-op.

--[no]incompatible_depset_for_java_output_source_jars

Allows multiple
False
Documentation category
starlark_semantics
Option effect tags
loading_and_analysis
Option metadata tags
incompatible_change

Use with: common

When true, Bazel no longer returns a list from linking_context.libraries_to_link but returns a depset instead.

--[no]incompatible_depset_for_libraries_to_link_getter

Allows multiple
False
Documentation category
starlark_semantics
Option effect tags
loading_and_analysis
Option metadata tags
incompatible_change

--incompatible_disable_legacy_cc_provider 🔗

Use with: configuration

No-op flag. Will be removed in a future release.

--[no]incompatible_disable_legacy_cc_provider

Allows multiple
False
Documentation category
undocumented
Option effect tags
loading_and_analysis
Option metadata tags
incompatible_change

--incompatible_disable_legacy_flags_cc_toolchain_api 🔗

Use with: build

Flag for disabling the legacy cc_toolchain Starlark API for accessing legacy CROSSTOOL fields.

--[no]incompatible_disable_legacy_flags_cc_toolchain_api

Allows multiple
False
Documentation category
undocumented
Option effect tags
loading_and_analysis
Option metadata tags
incompatible_changedeprecated

--incompatible_disable_native_android_rules 🔗

Use with: configuration

If enabled, direct usage of the native Android rules is disabled. Please use the Starlark Android rules from https://github.com/bazelbuild/rules_android

--[no]incompatible_disable_native_android_rules

Allows multiple
False
Documentation category
input_strictness
Option effect tags
eagerness_to_exit
Option metadata tags
incompatible_change

--incompatible_disable_native_apple_binary_rule 🔗

Use with: configuration

No-op. Kept here for backwards compatibility.

--[no]incompatible_disable_native_apple_binary_rule

Allows multiple
False
Documentation category
input_strictness
Option effect tags
eagerness_to_exit
Option metadata tags
incompatible_change

--incompatible_disable_nocopts 🔗

Use with: configuration

When enabled, it removes nocopts attribute from C++ rules. See https://github.com/bazelbuild/bazel/issues/8706 for details.

--[no]incompatible_disable_nocopts

Allows multiple
False
Documentation category
undocumented
Option effect tags
action_command_lines
Option metadata tags
incompatible_change

--incompatible_disable_non_executable_java_binary 🔗

Use with: common

If true, java_binary is always executable. create_executable attribute is removed.

--[no]incompatible_disable_non_executable_java_binary

Allows multiple
False
Documentation category
uncategorized
Option effect tags
loading_and_analysis
Option metadata tags
incompatible_change

--incompatible_disable_objc_library_transition 🔗

Use with: common

Disable objc_library's custom transition and inherit from the top level target instead

--[no]incompatible_disable_objc_library_transition

Allows multiple
False
Documentation category
starlark_semantics
Option effect tags
build_file_semantics
Option metadata tags
incompatible_change

--incompatible_disable_starlark_host_transitions 🔗

Use with: common

If set to true, rule attributes cannot set 'cfg = "host"'. Rules should set 'cfg = "exec"' instead.

--[no]incompatible_disable_starlark_host_transitions

Allows multiple
False
Documentation category
starlark_semantics
Option effect tags
loading_and_analysis
Option metadata tags
incompatible_change

--incompatible_disable_target_default_provider_fields 🔗

Use with: common

If set to true, disable the ability to access providers on 'target' objects via field syntax. Use provider-key syntax instead. For example, instead of using `ctx.attr.dep.my_info` to access `my_info` from inside a rule implementation function, use `ctx.attr.dep[MyInfo]`. See https://github.com/bazelbuild/bazel/issues/9014 for details.

--[no]incompatible_disable_target_default_provider_fields

Allows multiple
False
Documentation category
starlark_semantics
Option effect tags
build_file_semantics
Option metadata tags
incompatible_change

--incompatible_disable_target_provider_fields 🔗

Use with: common

If set to true, disable the ability to utilize the default provider via field syntax. Use provider-key syntax instead. For example, instead of using `ctx.attr.dep.files` to access `files`, utilize `ctx.attr.dep[DefaultInfo].files See https://github.com/bazelbuild/bazel/issues/9014 for details.

--[no]incompatible_disable_target_provider_fields

Allows multiple
False
Documentation category
starlark_semantics
Option effect tags
build_file_semantics
Option metadata tags
incompatible_change

--incompatible_disallow_empty_glob 🔗

Use with: common

If set to true, the default value of the `allow_empty` argument of glob() is False.

--[no]incompatible_disallow_empty_glob

Allows multiple
False
Documentation category
starlark_semantics
Option effect tags
build_file_semantics
Option metadata tags
incompatible_change

--incompatible_disallow_java_import_empty_jars 🔗

Use with: configuration

When enabled, empty java_import.jars is not supported.

--[no]incompatible_disallow_java_import_empty_jars

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown
Option metadata tags
incompatible_change

--incompatible_disallow_java_import_exports 🔗

Use with: configuration

When enabled, java_import.exports is not supported.

--[no]incompatible_disallow_java_import_exports

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown
Option metadata tags
incompatible_change

--incompatible_disallow_legacy_py_provider 🔗

Use with: configuration

No-op, will be removed soon.

--[no]incompatible_disallow_legacy_py_provider

Allows multiple
False
Documentation category
starlark_semantics
Option effect tags
loading_and_analysis
Option metadata tags
incompatible_change

--incompatible_disallow_resource_jars 🔗

Use with: configuration

Disables the resource_jars attribute; use java_import and deps or runtime_deps instead.

--[no]incompatible_disallow_resource_jars

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown
Option metadata tags
incompatible_change

--incompatible_disallow_sdk_frameworks_attributes 🔗

Use with: configuration

If true, disallow sdk_frameworks and weak_sdk_frameworks attributes in objc_library andobjc_import.

--[no]incompatible_disallow_sdk_frameworks_attributes

Allows multiple
False
Documentation category
starlark_semantics
Option effect tags
build_file_semantics
Option metadata tags
incompatible_change

--incompatible_disallow_struct_provider_syntax 🔗

Use with: common

If set to true, rule implementation functions may not return a struct. They must instead return a list of provider instances.

--[no]incompatible_disallow_struct_provider_syntax

Allows multiple
False
Documentation category
starlark_semantics
Option effect tags
build_file_semantics
Option metadata tags
incompatible_change

Use with: common

No-op.

--[no]incompatible_disallow_symlink_file_to_dir

Allows multiple
False
Documentation category
uncategorized
Option effect tags
loading_and_analysis
Option metadata tags
incompatible_change

--incompatible_disallow_unsound_directory_outputs 🔗

Use with: configuration

If set, it is an error for an action to materialize an output file as a directory. Does not affect source directories.

--[no]incompatible_disallow_unsound_directory_outputs

Allows multiple
False
Documentation category
undocumented
Option effect tags
bazel_internal_configuration
Option metadata tags
incompatible_change

--incompatible_do_not_split_linking_cmdline 🔗

Use with: common

When true, Bazel no longer modifies command line flags used for linking, and also doesn't selectively decide which flags go to the param file and which don't. See https://github.com/bazelbuild/bazel/issues/7670 for details.

--[no]incompatible_do_not_split_linking_cmdline

Allows multiple
False
Documentation category
build_time_optimization
Option effect tags
loading_and_analysis
Option metadata tags
incompatible_change

--incompatible_dont_collect_native_libraries_in_data 🔗

Use with: configuration

This flag is a noop and scheduled for removal.

--[no]incompatible_dont_collect_native_libraries_in_data

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown
Option metadata tags
incompatible_change

--incompatible_dont_enable_host_nonhost_crosstool_features 🔗

Use with: configuration

If true, Bazel will not enable 'host' and 'nonhost' features in the c++ toolchain (see https://github.com/bazelbuild/bazel/issues/7407 for more information).

--[no]incompatible_dont_enable_host_nonhost_crosstool_features

Allows multiple
False
Documentation category
toolchain
Option effect tags
loading_and_analysis
Option metadata tags
incompatible_change

--incompatible_dont_use_javasourceinfoprovider 🔗

Use with: build

No-op

--[no]incompatible_dont_use_javasourceinfoprovider

Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown
Option metadata tags
incompatible_change

--incompatible_enable_android_toolchain_resolution 🔗

Use with: configuration

Use toolchain resolution to select the Android SDK for android rules (Starlark and native)

--[no]incompatible_enable_android_toolchain_resolution

Allows multiple
False
Documentation category
toolchain
Option effect tags
loading_and_analysis
Option metadata tags
incompatible_change

--incompatible_enable_apple_toolchain_resolution 🔗

Use with: configuration

Use toolchain resolution to select the Apple SDK for apple rules (Starlark and native)

--[no]incompatible_enable_apple_toolchain_resolution

Allows multiple
False
Documentation category
toolchain
Option effect tags
loading_and_analysis
Option metadata tags
incompatible_change

--incompatible_enable_cc_test_feature 🔗

Use with: configuration

When enabled, it switches Crosstool to use feature 'is_cc_test' rather than the link-time build variable of the same name.

--[no]incompatible_enable_cc_test_feature

Allows multiple
False
Documentation category
undocumented
Option effect tags
action_command_lines
Option metadata tags
incompatible_change

--incompatible_enable_cc_toolchain_resolution 🔗

Use with: configuration

No-op flag. Will be removed in a future release.

--[no]incompatible_enable_cc_toolchain_resolution

Allows multiple
False
Documentation category
undocumented
Option effect tags
loading_and_analysis
Option metadata tags
incompatible_change

--incompatible_enable_deprecated_label_apis 🔗

Use with: common

If enabled, certain deprecated APIs (native.repository_name, Label.workspace_name, Label.relative) can be used.

--[no]incompatible_enable_deprecated_label_apis

Allows multiple
False
Documentation category
starlark_semantics
Option effect tags
loading_and_analysis

--incompatible_enable_profile_by_default 🔗

Use with: build

No-op.

--[no]incompatible_enable_profile_by_default

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown
Option metadata tags
incompatible_change

--incompatible_enable_proto_toolchain_resolution 🔗

Use with: common

If true, proto lang rules define toolchains from rules_proto, rules_java, rules_cc repositories.

--[no]incompatible_enable_proto_toolchain_resolution

Allows multiple
False
Documentation category
toolchain
Option effect tags
loading_and_analysis
Option metadata tags
incompatible_change

--incompatible_enforce_config_setting_visibility 🔗

Use with: buildcanonicalize-flagsfetchmodquerysync

If true, enforce config_setting visibility restrictions. If false, every config_setting is visible to every target. See https://github.com/bazelbuild/bazel/issues/12932.

--[no]incompatible_enforce_config_setting_visibility

Allows multiple
False
Documentation category
starlark_semantics
Option effect tags
loading_and_analysis
Option metadata tags
incompatible_change

--incompatible_exclusive_test_sandboxed 🔗

Use with: configuration

If true, exclusive tests will run with sandboxed strategy. Add 'local' tag to force an exclusive test run locally

--[no]incompatible_exclusive_test_sandboxed

Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown
Option metadata tags
incompatible_change

--incompatible_existing_rules_immutable_view 🔗

Use with: common

If set to true, native.existing_rule and native.existing_rules return lightweight immutable view objects instead of mutable dicts.

--[no]incompatible_existing_rules_immutable_view

Allows multiple
False
Documentation category
starlark_semantics
Option effect tags
build_file_semanticsloading_and_analysis
Option metadata tags
incompatible_change

--incompatible_fail_on_unknown_attributes 🔗

Use with: common

If enabled, targets that have unknown attributes set to None fail.

--[no]incompatible_fail_on_unknown_attributes

Allows multiple
False
Documentation category
starlark_semantics
Option effect tags
loading_and_analysis
Option metadata tags
incompatible_change

--incompatible_fix_package_group_reporoot_syntax 🔗

Use with: common

In package_group's `packages` attribute, changes the meaning of the value "//..." to refer to all packages in the current repository instead of all packages in any repository. You can use the special value "public" in place of "//..." to obtain the old behavior. This flag requires that --incompatible_package_group_has_public_syntax also be enabled.

--[no]incompatible_fix_package_group_reporoot_syntax

Allows multiple
False
Documentation category
starlark_semantics
Option effect tags
build_file_semantics
Option metadata tags
incompatible_change

--incompatible_generated_protos_in_virtual_imports 🔗

Use with: common

No-op.

--[no]incompatible_generated_protos_in_virtual_imports

Allows multiple
False
Documentation category
undocumented
Option effect tags
no_op
Option metadata tags
deprecated

--incompatible_j2objc_library_migration 🔗

Use with: configuration

If enabled, direct usage of the native j2objc_library rules is disabled. Please use the Starlark rule instead.

--[no]incompatible_j2objc_library_migration

Allows multiple
False
Documentation category
undocumented
Option effect tags
loading_and_analysis
Option metadata tags
incompatible_change

--incompatible_java_common_parameters 🔗

Use with: common

If set to true, the output_jar, and host_javabase parameters in pack_sources and host_javabase in compile will all be removed.

--[no]incompatible_java_common_parameters

Allows multiple
False
Documentation category
starlark_semantics
Option effect tags
build_file_semantics
Option metadata tags
incompatible_change

--incompatible_java_info_merge_runtime_module_flags 🔗

Use with: common

If set to true, the JavaInfo constructor will merge add_exports and add_opens of runtime_deps in addition to deps and exports.

--[no]incompatible_java_info_merge_runtime_module_flags

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown
Option metadata tags
incompatible_change

--incompatible_legacy_local_fallback 🔗

Use with: build

If set to true, enables the legacy implicit fallback from sandboxed to local strategy. This flag will eventually default to false and then become a no-op. Use --strategy, --spawn_strategy, or --dynamic_local_strategy to configure fallbacks instead.

--[no]incompatible_legacy_local_fallback

Allows multiple
False
Documentation category
input_strictness
Option effect tags
execution
Option metadata tags
incompatible_change

--incompatible_lexicographical_output 🔗

Use with: query

If this option is set, sorts --order_output=auto output in lexicographical order.

--[no]incompatible_lexicographical_output

Allows multiple
False
Documentation category
query
Option effect tags
terminal_output
Option metadata tags
incompatible_change

--incompatible_load_java_rules_from_bzl 🔗

Use with: build

Deprecated no-op.

--[no]incompatible_load_java_rules_from_bzl

Allows multiple
False
Documentation category
undocumented
Option effect tags
loading_and_analysis
Option metadata tags
incompatible_change

--incompatible_load_proto_rules_from_bzl 🔗

Use with: build

Deprecated no-op.

--[no]incompatible_load_proto_rules_from_bzl

Allows multiple
False
Documentation category
undocumented
Option effect tags
loading_and_analysis
Option metadata tags
incompatible_change

--incompatible_load_python_rules_from_bzl 🔗

Use with: build

Deprecated no-op.

--[no]incompatible_load_python_rules_from_bzl

Allows multiple
False
Documentation category
undocumented
Option effect tags
loading_and_analysis
Option metadata tags
incompatible_change

--incompatible_macos_set_install_name 🔗

Use with: configuration

Whether to explicitly set `-install_name` when creating dynamic libraries. See https://github.com/bazelbuild/bazel/issues/12370

--[no]incompatible_macos_set_install_name

Allows multiple
False
Documentation category
undocumented
Option effect tags
loading_and_analysis
Option metadata tags
incompatible_change

--incompatible_make_thinlto_command_lines_standalone 🔗

Use with: configuration

If true, Bazel will not reuse C++ link action command lines for lto indexing command lines (see https://github.com/bazelbuild/bazel/issues/6791 for more information).

--[no]incompatible_make_thinlto_command_lines_standalone

Allows multiple
False
Documentation category
toolchain
Option effect tags
loading_and_analysis
Option metadata tags
incompatible_change

--incompatible_merge_fixed_and_default_shell_env 🔗

Use with: common

If enabled, actions registered with ctx.actions.run and ctx.actions.run_shell with both 'env' and 'use_default_shell_env = True' specified will use an environment obtained from the default shell environment by overriding with the values passed in to 'env'. If disabled, the value of 'env' is completely ignored in this case.

--[no]incompatible_merge_fixed_and_default_shell_env

Allows multiple
False
Documentation category
starlark_semantics
Option effect tags
loading_and_analysis
Option metadata tags
incompatible_change

--incompatible_merge_genfiles_directory 🔗

Use with: configuration

If true, the genfiles directory is folded into the bin directory.

--[no]incompatible_merge_genfiles_directory

Allows multiple
False
Documentation category
output_parameters
Option effect tags
affects_outputs
Option metadata tags
incompatible_change

--incompatible_multi_release_deploy_jars 🔗

Use with: configuration

When enabled, java_binary creates Multi-Release deploy jars.

--[no]incompatible_multi_release_deploy_jars

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown
Option metadata tags
incompatible_change

--incompatible_new_actions_api 🔗

Use with: common

No-op

--[no]incompatible_new_actions_api

Allows multiple
False
Documentation category
starlark_semantics
Option effect tags
no_op
Option metadata tags
incompatible_change

--incompatible_no_attr_license 🔗

Use with: common

If set to true, disables the function `attr.license`.

--[no]incompatible_no_attr_license

Allows multiple
False
Documentation category
starlark_semantics
Option effect tags
build_file_semantics
Option metadata tags
incompatible_change

--incompatible_no_implicit_file_export 🔗

Use with: common

If set, (used) source files are are package private unless exported explicitly. See https://github.com/bazelbuild/proposals/blob/master/designs/2019-10-24-file-visibility.md

--[no]incompatible_no_implicit_file_export

Allows multiple
False
Documentation category
starlark_semantics
Option effect tags
build_file_semantics
Option metadata tags
incompatible_change

--incompatible_no_package_distribs 🔗

Use with: common

If set to true, disables the `package(distribs=...)`.

--[no]incompatible_no_package_distribs

Allows multiple
False
Documentation category
undocumented
Option effect tags
build_file_semantics
Option metadata tags
incompatible_change

--incompatible_no_rule_outputs_param 🔗

Use with: common

If set to true, disables the `outputs` parameter of the `rule()` Starlark function.

--[no]incompatible_no_rule_outputs_param

Allows multiple
False
Documentation category
starlark_semantics
Option effect tags
build_file_semantics
Option metadata tags
incompatible_change

Use with: configuration

If true, make the default value true for alwayslink attributes in objc_library and objc_import.

--[no]incompatible_objc_alwayslink_by_default

Allows multiple
False
Documentation category
starlark_semantics
Option effect tags
build_file_semantics
Option metadata tags
incompatible_change

--incompatible_objc_provider_remove_linking_info 🔗

Use with: common

If set to true, the ObjcProvider's APIs for linking info will be removed.

--[no]incompatible_objc_provider_remove_linking_info

Allows multiple
False
Documentation category
starlark_semantics
Option effect tags
build_file_semantics
Option metadata tags
incompatible_change

--incompatible_override_toolchain_transition 🔗

Use with: build

Deprecated, this is no longer in use and should be removed.

--[no]incompatible_override_toolchain_transition

Allows multiple
False
Deprecation warning
This is now always set, please remove this flag.
Documentation category
undocumented
Option effect tags
unknown

--incompatible_package_group_has_public_syntax 🔗

Use with: common

In package_group's `packages` attribute, allows writing "public" or "private" to refer to all packages or no packages respectively.

--[no]incompatible_package_group_has_public_syntax

Allows multiple
False
Documentation category
starlark_semantics
Option effect tags
build_file_semantics
Option metadata tags
incompatible_change

--incompatible_package_group_includes_double_slash 🔗

Use with: aquerycqueryquery

If enabled, when outputting package_group's `packages` attribute, the leading `//` will not be omitted.

--[no]incompatible_package_group_includes_double_slash

Allows multiple
False
Documentation category
query
Option effect tags
terminal_output
Option metadata tags
incompatible_change

--incompatible_py2_outputs_are_suffixed 🔗

Use with: configuration

If true, targets built in the Python 2 configuration will appear under an output root that includes the suffix '-py2', while targets built for Python 3 will appear in a root with no Python-related suffix. This means that the `bazel-bin` convenience symlink will point to Python 3 targets rather than Python 2. If you enable this option it is also recommended to enable `--incompatible_py3_is_default`.

--[no]incompatible_py2_outputs_are_suffixed

Allows multiple
False
Documentation category
generic_inputs
Option effect tags
affects_outputs
Option metadata tags
incompatible_change

--incompatible_py3_is_default 🔗

Use with: configuration

If true, `py_binary` and `py_test` targets that do not set their `python_version` (or `default_python_version`) attribute will default to PY3 rather than to PY2. If you set this flag it is also recommended to set `--incompatible_py2_outputs_are_suffixed`.

--[no]incompatible_py3_is_default

Allows multiple
False
Documentation category
generic_inputs
Option effect tags
loading_and_analysisaffects_outputs
Option metadata tags
incompatible_change

--incompatible_python_disable_py2 🔗

Use with: configuration

If true, using Python 2 settings will cause an error. This includes python_version=PY2, srcs_version=PY2, and srcs_version=PY2ONLY. See https://github.com/bazelbuild/bazel/issues/15684 for more information.

--[no]incompatible_python_disable_py2

Allows multiple
False
Documentation category
input_strictness
Option effect tags
loading_and_analysis
Option metadata tags
incompatible_change

--incompatible_python_disallow_native_rules 🔗

Use with: configuration

When true, an error occurs when using the builtin py_* rules; instead the rule_python rules should be used. See https://github.com/bazelbuild/bazel/issues/17773 for more information and migration instructions.

--[no]incompatible_python_disallow_native_rules

Allows multiple
False
Documentation category
starlark_semantics
Option effect tags
loading_and_analysis
Option metadata tags
incompatible_change

--incompatible_remote_build_event_upload_respect_no_cache 🔗

Use with: buildcommon

Deprecated. No-op. Use --remote_build_event_upload=minimal instead.

--[no]incompatible_remote_build_event_upload_respect_no_cache

Allows multiple
False
Deprecation warning
--incompatible_remote_build_event_upload_respect_no_cache has been deprecated in favor of --remote_build_event_upload=minimal.
Documentation category
remote
Option effect tags
unknown

Use with: buildcommon

If set to true and --incompatible_remote_symlinks is also true, symlinks in action outputs are allowed to dangle.

--[no]incompatible_remote_dangling_symlinks

Allows multiple
False
Documentation category
execution_strategy
Option effect tags
execution
Option metadata tags
incompatible_change

--incompatible_remote_downloader_send_all_headers 🔗

Use with: buildcommon

Whether to send all values of a multi-valued header to the remote downloader instead of just the first.

--[no]incompatible_remote_downloader_send_all_headers

Allows multiple
False
Documentation category
remote
Option effect tags
unknown
Option metadata tags
incompatible_change

--incompatible_remote_output_paths_relative_to_input_root 🔗

Use with: buildcommon

If set to true, output paths are relative to input root instead of working directory.

--[no]incompatible_remote_output_paths_relative_to_input_root

Allows multiple
False
Documentation category
remote
Option effect tags
unknown
Option metadata tags
incompatible_change

--incompatible_remote_results_ignore_disk 🔗

Use with: buildcommon

No-op

--[no]incompatible_remote_results_ignore_disk

Allows multiple
False
Documentation category
remote
Option effect tags
unknown
Option metadata tags
incompatible_change

Use with: buildcommon

If set to true, Bazel will represent symlinks in action outputs in the remote caching/execution protocol as such. Otherwise, symlinks will be followed and represented as files or directories. See #6631 for details.

--[no]incompatible_remote_symlinks

Allows multiple
False
Documentation category
execution_strategy
Option effect tags
execution
Option metadata tags
incompatible_change

--incompatible_remote_use_new_exit_code_for_lost_inputs 🔗

Use with: build

If set to true, Bazel will use new exit code 39 instead of 34 if remote cache evicts blobs during the build.

--[no]incompatible_remote_use_new_exit_code_for_lost_inputs

Allows multiple
False
Documentation category
remote
Option effect tags
unknown
Option metadata tags
incompatible_change

--incompatible_remove_binary_profile 🔗

Use with: build

No-op.

--[no]incompatible_remove_binary_profile

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown
Option metadata tags
incompatible_change

--incompatible_remove_legacy_whole_archive 🔗

Use with: configuration

If true, Bazel will not link library dependencies as whole archive by default (see https://github.com/bazelbuild/bazel/issues/7362 for migration instructions).

--[no]incompatible_remove_legacy_whole_archive

Allows multiple
False
Documentation category
toolchain
Option effect tags
loading_and_analysis
Option metadata tags
incompatible_change

--incompatible_remove_old_python_version_api 🔗

Use with: configuration

No-op, will be removed soon.

--[no]incompatible_remove_old_python_version_api

Allows multiple
False
Documentation category
undocumented
Option effect tags
loading_and_analysis
Option metadata tags
incompatible_change

--incompatible_remove_rule_name_parameter 🔗

Use with: common

No-op

--[no]incompatible_remove_rule_name_parameter

Allows multiple
False
Documentation category
undocumented
Option effect tags
no_op
Option metadata tags
deprecated

--incompatible_require_ctx_in_configure_features 🔗

Use with: configuration

This flag is a noop and scheduled for removal.

--[no]incompatible_require_ctx_in_configure_features

Allows multiple
False
Documentation category
toolchain
Option effect tags
no_op
Option metadata tags
incompatible_change

--incompatible_require_javaplugininfo_in_javacommon 🔗

Use with: build

When enabled java_common.compile only accepts JavaPluginInfo for plugins.

--[no]incompatible_require_javaplugininfo_in_javacommon

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown
Option metadata tags
incompatible_change

--incompatible_require_linker_input_cc_api 🔗

Use with: common

If set to true, rule create_linking_context will require linker_inputs instead of libraries_to_link. The old getters of linking_context will also be disabled and just linker_inputs will be available.

--[no]incompatible_require_linker_input_cc_api

Allows multiple
False
Documentation category
starlark_semantics
Option effect tags
build_file_semanticsloading_and_analysis
Option metadata tags
incompatible_change

--incompatible_run_shell_command_string 🔗

Use with: common

If set to true, the command parameter of actions.run_shell will only accept string

--[no]incompatible_run_shell_command_string

Allows multiple
False
Documentation category
starlark_semantics
Option effect tags
build_file_semantics
Option metadata tags
incompatible_change

--incompatible_sandbox_hermetic_tmp 🔗

Use with: build

If set to true, each Linux sandbox will have its own dedicated empty directory mounted as /tmp rather than sharing /tmp with the host filesystem. Use --sandbox_add_mount_pair=/tmp to keep seeing the host's /tmp in all sandboxes.

--[no]incompatible_sandbox_hermetic_tmp

Allows multiple
False
Documentation category
execution_strategy
Option effect tags
execution

Use with: build

If set to true, the genfiles symlink will not be created. For more information, see https://github.com/bazelbuild/bazel/issues/8651

--[no]incompatible_skip_genfiles_symlink

Allows multiple
False
Documentation category
undocumented
Option effect tags
loses_incremental_state
Option metadata tags
incompatible_change

--incompatible_stop_exporting_language_modules 🔗

Use with: common

If enabled, certain language-specific modules (such as `cc_common`) are unavailable in user .bzl files and may only be called from their respective rules repositories.

--[no]incompatible_stop_exporting_language_modules

Allows multiple
False
Documentation category
starlark_semantics
Option effect tags
loading_and_analysis
Option metadata tags
incompatible_change

--incompatible_strict_action_env 🔗

Use with: configuration

If true, Bazel uses an environment with a static value for PATH and does not inherit LD_LIBRARY_PATH. Use --action_env=ENV_VARIABLE if you want to inherit specific environment variables from the client, but note that doing so can prevent cross-user caching if a shared cache is used.

--[no]incompatible_strict_action_env

Old name
--[no]experimental_strict_action_env
Warn old name
True
Allows multiple
False
Documentation category
uncategorized
Option effect tags
loading_and_analysis
Option metadata tags
incompatible_change

--incompatible_strip_executable_safely 🔗

Use with: configuration

If true, strip action for executables will use flag -x, which does not break dynamic symbol resolution.

--[no]incompatible_strip_executable_safely

Allows multiple
False
Documentation category
toolchain
Option effect tags
action_command_lines
Option metadata tags
incompatible_change

--incompatible_struct_has_no_methods 🔗

Use with: common

Disables the to_json and to_proto methods of struct, which pollute the struct field namespace. Instead, use json.encode or json.encode_indent for JSON, or proto.encode_text for textproto.

--[no]incompatible_struct_has_no_methods

Allows multiple
False
Documentation category
starlark_semantics
Option effect tags
build_file_semantics
Option metadata tags
incompatible_change

--incompatible_top_level_aspects_require_providers 🔗

Use with: common

If set to true, the top level aspect will honor its required providers and only run on top level targets whose rules' advertised providers satisfy the required providers of the aspect.

--[no]incompatible_top_level_aspects_require_providers

Allows multiple
False
Documentation category
starlark_semantics
Option effect tags
loading_and_analysis
Option metadata tags
incompatible_change

--incompatible_unambiguous_label_stringification 🔗

Use with: common

When true, Bazel will stringify the label @//foo:bar to @//foo:bar, instead of //foo:bar. This only affects the behavior of str(), the % operator, and so on; the behavior of repr() is unchanged. See https://github.com/bazelbuild/bazel/issues/15916 for more information.

--[no]incompatible_unambiguous_label_stringification

Allows multiple
False
Documentation category
starlark_semantics
Option effect tags
loading_and_analysis
Option metadata tags
incompatible_change

--incompatible_use_cc_configure_from_rules_cc 🔗

Use with: common

When true, Bazel will no longer allow using cc_configure from @bazel_tools. Please see https://github.com/bazelbuild/bazel/issues/10134 for details and migration instructions.

--[no]incompatible_use_cc_configure_from_rules_cc

Allows multiple
False
Documentation category
starlark_semantics
Option effect tags
loading_and_analysis
Option metadata tags
incompatible_change

--incompatible_use_cpp_compile_header_mnemonic 🔗

Use with: configuration

If enabled, give distinguishing mnemonic to header processing actions

--[no]incompatible_use_cpp_compile_header_mnemonic

Allows multiple
False
Documentation category
undocumented
Option effect tags
execution
Option metadata tags
incompatible_change

--incompatible_use_host_features 🔗

Use with: configuration

If true, use --features only for the target configuration and --host_features for the exec configuration.

--[no]incompatible_use_host_features

Allows multiple
False
Documentation category
output_parameters
Option effect tags
changes_inputsaffects_outputs
Option metadata tags
incompatible_change

--incompatible_use_python_toolchains 🔗

Use with: configuration

If set to true, executable native Python rules will use the Python runtime specified by the Python toolchain, rather than the runtime given by legacy flags like --python_top.

--[no]incompatible_use_python_toolchains

Allows multiple
False
Documentation category
generic_inputs
Option effect tags
loading_and_analysis
Option metadata tags
incompatible_change

--incompatible_use_specific_tool_files 🔗

Use with: configuration

Use cc toolchain's compiler_files, as_files, and ar_files as inputs to appropriate actions. See https://github.com/bazelbuild/bazel/issues/8531

--[no]incompatible_use_specific_tool_files

Allows multiple
False
Documentation category
undocumented
Option effect tags
loading_and_analysis
Option metadata tags
incompatible_change

--incompatible_use_toolchain_resolution_for_java_rules 🔗

Use with: configuration

No-op. Kept here for backwards compatibility.

--[no]incompatible_use_toolchain_resolution_for_java_rules

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown
Option metadata tags
incompatible_change

--incompatible_validate_top_level_header_inclusions 🔗

Use with: configuration

This flag is a noop and scheduled for removal.

--[no]incompatible_validate_top_level_header_inclusions

Allows multiple
False
Documentation category
input_strictness
Option effect tags
no_op
Option metadata tags
incompatible_change

--incompatible_visibility_private_attributes_at_definition 🔗

Use with: common

If set to true, the visibility of private rule attributes is checked with respect to the rule definition, falling back to rule usage if not visible.

--[no]incompatible_visibility_private_attributes_at_definition

Allows multiple
False
Documentation category
starlark_semantics
Option effect tags
build_file_semantics
Option metadata tags
incompatible_change

--incremental 🔗

Use with: mobile-install

Whether to do an incremental install. If true, try to avoid unnecessary additional work by reading the state of the device the code is to be installed on and using that information to avoid unnecessary work. If false (the default), always do a full install.

--[no]incremental

Allows multiple
False
Documentation category
output_selection
Option effect tags
loading_and_analysis

--incremental_dexing 🔗

Use with: configuration

Does most of the work for dexing separately for each Jar file.

--[no]incremental_dexing

Allows multiple
False
Documentation category
build_time_optimization
Option effect tags
affects_outputsloading_and_analysisloses_incremental_state

--incremental_install_verbosity 🔗

Use with: mobile-install

The verbosity for incremental install. Set to 1 for debug logging.

--incremental_install_verbosity

Allows multiple
False
Documentation category
logging
Option effect tags
bazel_monitoring

--infer_universe_scope 🔗

Use with: aquerycqueryquery

If set and --universe_scope is unset, then a value of --universe_scope will be inferred as the list of unique target patterns in the query expression. Note that the --universe_scope value inferred for a query expression that uses universe-scoped functions (e.g.`allrdeps`) may not be what you want, so you should use this option only if you know what you are doing. See https://bazel.build/reference/query#sky-query for details and examples. If --universe_scope is set, then this option's value is ignored. Note: this option applies only to `query` (i.e. not `cquery`).

--[no]infer_universe_scope

Allows multiple
False
Documentation category
query
Option effect tags
loading_and_analysis

--instrument_test_targets 🔗

Use with: configuration

When coverage is enabled, specifies whether to consider instrumenting test rules. When set, test rules included by --instrumentation_filter are instrumented. Otherwise, test rules are always excluded from coverage instrumentation.

--[no]instrument_test_targets

Allows multiple
False
Documentation category
output_parameters
Option effect tags
affects_outputs

--instrumentation_filter 🔗

Use with: configuration

When coverage is enabled, only rules with names included by the specified regex-based filter will be instrumented. Rules prefixed with '-' are excluded instead. Note that only non-test rules are instrumented unless --instrument_test_targets is enabled.

--instrumentation_filter

Allows multiple
False
Documentation category
output_parameters
Option effect tags
affects_outputs

--interface_shared_objects 🔗

Use with: configuration

Use interface shared objects if supported by the toolchain. All ELF toolchains currently support this setting.

--[no]interface_shared_objects

Allows multiple
False
Documentation category
toolchain
Option effect tags
loading_and_analysisaffects_outputs

--internal_persistent_android_dex_desugar 🔗

Use with: configuration

Tracking flag for when dexing and desugaring workers are enabled.

--[no]internal_persistent_android_dex_desugar

Allows multiple
False
Documentation category
undocumented
Option effect tags
host_machine_resource_optimizationsexecution

--internal_persistent_busybox_tools 🔗

Use with: configuration

Tracking flag for when busybox workers are enabled.

--[no]internal_persistent_busybox_tools

Allows multiple
False
Documentation category
undocumented
Option effect tags
host_machine_resource_optimizationsexecution

--internal_persistent_multiplex_android_dex_desugar 🔗

Use with: configuration

Tracking flag for when multiplexed dexing and desugaring workers are enabled.

--[no]internal_persistent_multiplex_android_dex_desugar

Allows multiple
False
Documentation category
undocumented
Option effect tags
host_machine_resource_optimizationsexecution

--internal_persistent_multiplex_busybox_tools 🔗

Use with: configuration

Tracking flag for when multiplexed busybox workers are enabled.

--[no]internal_persistent_multiplex_busybox_tools

Allows multiple
False
Documentation category
undocumented
Option effect tags
host_machine_resource_optimizationsexecution

--internal_spawn_scheduler 🔗

Use with: build

Placeholder option so that we can tell in Blaze whether the spawn scheduler was enabled.

--[no]internal_spawn_scheduler

Allows multiple
False
Documentation category
execution_strategy
Option effect tags
executionhost_machine_resource_optimizations

--internal_starlark_flag_test_canary 🔗

Use with: common

--[no]internal_starlark_flag_test_canary

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown

--invocation_id 🔗

Use with: common

Unique identifier, in UUID format, for the command being run. If explicitly specified uniqueness must be ensured by the caller. The UUID is printed to stderr, the BEP and remote execution protocol.

--invocation_id

Allows multiple
False
Documentation category
undocumented
Option effect tags
bazel_monitoringbazel_internal_configuration

--invocation_policy 🔗

Use with: canonicalize-flagsstartup

A base64-encoded-binary-serialized or text-formated invocation_policy.InvocationPolicy proto. Unlike other options, it is an error to specify --invocation_policy multiple times.

--invocation_policy

Allows multiple
False
Documentation category
undocumented
Option effect tags
changes_inputs

--io_nice_level 🔗

Use with: startup

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. The anticipatory scheduler may only honor up to priority 4. If set to a negative value, then Bazel does not perform a system call.

--io_nice_level={-1,0,1,2,3,4,5,6,7}

Allows multiple
False
Documentation category
bazel_client_options
Option effect tags
host_machine_resource_optimizations

--ios_memleaks 🔗

Use with: configuration

Enable checking for memory leaks in ios_test targets.

--[no]ios_memleaks

Allows multiple
False
Documentation category
testing
Option effect tags
action_command_lines

--ios_minimum_os 🔗

Use with: configuration

Minimum compatible iOS version for target simulators and devices. If unspecified, uses 'ios_sdk_version'.

--ios_minimum_os

Allows multiple
False
Documentation category
output_parameters
Option effect tags
loses_incremental_state

--ios_multi_cpus 🔗

Use with: configuration

Comma-separated list of architectures to build an ios_application with. The result is a universal binary containing all specified architectures.

--ios_multi_cpus

Allows multiple
True
Documentation category
output_parameters
Option effect tags
loses_incremental_stateloading_and_analysis

--ios_sdk_version 🔗

Use with: configuration

Specifies the version of the iOS SDK to use to build iOS applications. If unspecified, uses default iOS SDK version from 'xcode_version'.

--ios_sdk_version

Allows multiple
False
Documentation category
toolchain
Option effect tags
loses_incremental_state

--ios_signing_cert_name 🔗

Use with: configuration

Certificate name to use for iOS signing. If not set will fall back to provisioning profile. May be the certificate's keychain identity preference or (substring) of the certificate's common name, as per codesign's man page (SIGNING IDENTITIES).

--ios_signing_cert_name

Allows multiple
False
Documentation category
signing
Option effect tags
action_command_lines

--ios_simulator_device 🔗

Use with: configuration

The device to simulate when running an iOS application in the simulator, e.g. 'iPhone 6'. You can get a list of devices by running 'xcrun simctl list devicetypes' on the machine the simulator will be run on.

--ios_simulator_device

Allows multiple
False
Documentation category
testing
Option effect tags
test_runner

--ios_simulator_version 🔗

Use with: configuration

The version of iOS to run on the simulator when running or testing. This is ignored for ios_test rules if a target device is specified in the rule.

--ios_simulator_version

Allows multiple
False
Documentation category
testing
Option effect tags
test_runner

--j2objc_dead_code_removal 🔗

Use with: configuration

Whether to perform J2ObjC dead code removal to strip unused code from the final app bundle.

--[no]j2objc_dead_code_removal

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown

--j2objc_dead_code_report 🔗

Use with: configuration

Allows J2ObjC to strip dead code reported by ProGuard. Takes a label that can generate a dead code report as argument.

--j2objc_dead_code_report

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown

--j2objc_translation_flags 🔗

Use with: configuration

Additional options to pass to the J2ObjC tool.

--j2objc_translation_flags

Allows multiple
True
Documentation category
uncategorized
Option effect tags
unknown

--java_debug 🔗

Use with: configuration

Causes the Java virtual machine of a java test to wait for a connection from a JDWP-compliant debugger (such as jdb) before starting the test. Implies -test_output=streamed.

--java_debug

Allows multiple
False
Documentation category
uncategorized
Expands to
--test_arg=--wrapper_script_flag=--debug
--test_output=streamed
--test_strategy=exclusive
--test_timeout=9999
--nocache_test_results
Option effect tags
unknown

--java_deps 🔗

Use with: configuration

Generate dependency information (for now, compile-time classpath) per Java target.

--[no]java_deps

Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown

--java_header_compilation 🔗

Use with: configuration

Compile ijars directly from source.

--[no]java_header_compilation

Old name
--[no]experimental_java_header_compilation
Warn old name
True
Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown

--java_language_version 🔗

Use with: configuration

The Java language version

--java_language_version

Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown

--java_launcher 🔗

Use with: configuration

The Java launcher to use when building Java binaries. If this flag is set to the empty string, the JDK launcher is used. The "launcher" attribute overrides this flag.

--java_launcher

Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown

--java_optimization_mode 🔗

Use with: common

Do not use.

--java_optimization_mode

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown

--java_runtime_version 🔗

Use with: configuration

The Java runtime version

--java_runtime_version

Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown

--java_toolchain 🔗

Use with: configuration

No-op. Kept here for backwards compatibility.

--java_toolchain

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown

--javabase 🔗

Use with: configuration

No-op. Kept here for backwards compatibility.

--javabase

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown

--javacopt 🔗

Use with: configuration

Additional options to pass to javac.

--javacopt

Allows multiple
True
Documentation category
uncategorized
Option effect tags
unknown

--jobs 🔗
-j

Use with: build

The number of concurrent jobs to run. Takes an integer, or a keyword ("auto", "HOST_CPUS", "HOST_RAM"), optionally followed by an operation ([-|*]<float>) eg. "auto", "HOST_CPUS*.5". Values must be between 1 and 5000. Values above 2500 may cause memory issues. "auto" calculates a reasonable default based on host resources.

--jobs

Allows multiple
False
Documentation category
execution_strategy
Option effect tags
host_machine_resource_optimizationsexecution

--jplPropagateCcLinkParamsStore 🔗

Use with: configuration

Roll-out flag for making java_proto_library propagate CcLinkParamsStore. DO NOT USE.

--[no]jplPropagateCcLinkParamsStore

Allows multiple
False
Documentation category
undocumented
Option effect tags
affects_outputsloading_and_analysis
Option metadata tags
incompatible_change

--jvmopt 🔗

Use with: configuration

Additional options to pass to the Java VM. These options will get added to the VM startup options of each java_binary target.

--jvmopt

Allows multiple
True
Documentation category
uncategorized
Option effect tags
unknown

--keep_going 🔗
-k

Use with: buildfetchmodquerysync

Continue as much as possible after an error. While the target that failed and those that depend on it cannot be analyzed, other prerequisites of these targets can be.

--[no]keep_going

Allows multiple
False
Documentation category
execution_strategy
Option effect tags
eagerness_to_exit

--keep_state_after_build 🔗

Use with: common

If false, Blaze will discard the inmemory state from this build when the build finishes. Subsequent builds will not have any incrementality with respect to this one.

--[no]keep_state_after_build

Allows multiple
False
Documentation category
build_time_optimization
Option effect tags
loses_incremental_state

--legacy_bazel_java_test 🔗

Use with: configuration

Use the legacy mode of Bazel for java_test.

--[no]legacy_bazel_java_test

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown

--legacy_external_runfiles 🔗

Use with: configuration

If true, build runfiles symlink forests for external repositories under .runfiles/wsname/external/repo (in addition to .runfiles/repo).

--[no]legacy_external_runfiles

Allows multiple
False
Documentation category
output_selection
Option effect tags
affects_outputs

--legacy_globbing_threads 🔗

Use with: buildcanonicalize-flagsfetchmodquerysync

Number of threads to use for glob evaluation. Takes an integer, or a keyword ("auto", "HOST_CPUS", "HOST_RAM"), optionally followed by an operation ([-|*]<float>) eg. "auto", "HOST_CPUS*.5". "auto" means to use a reasonable value derived from the machine's hardware profile (e.g. the number of processors).

--legacy_globbing_threads

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown

--legacy_important_outputs 🔗

Use with: buildcommon

Use this to suppress generation of the legacy important_outputs field in the TargetComplete event. important_outputs are required for Bazel to ResultStore integration.

--[no]legacy_important_outputs

Allows multiple
False
Documentation category
logging
Option effect tags
affects_outputs

--legacy_main_dex_list_generator 🔗

Use with: configuration

Specifies a binary to use to generate the list of classes that must be in the main dex when compiling legacy multidex.

--legacy_main_dex_list_generator

Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown

--legacy_whole_archive 🔗

Use with: configuration

Deprecated, superseded by --incompatible_remove_legacy_whole_archive (see https://github.com/bazelbuild/bazel/issues/7362 for details). When on, use --whole-archive for cc_binary rules that have linkshared=True and either linkstatic=True or '-static' in linkopts. This is for backwards compatibility only. A better alternative is to use alwayslink=1 where required.

--[no]legacy_whole_archive

Allows multiple
False
Documentation category
output_parameters
Option effect tags
action_command_linesaffects_outputs
Option metadata tags
deprecated

--line_terminator_null 🔗

Use with: aquerycqueryquery

Whether each format is terminated with \0 instead of newline.

--[no]line_terminator_null

Allows multiple
False
Documentation category
query
Option effect tags
terminal_output

--linkopt 🔗

Use with: configuration

Additional option to pass to gcc when linking.

--linkopt

Allows multiple
True
Documentation category
output_parameters
Option effect tags
action_command_linesaffects_outputs

--loading_phase_threads 🔗

Use with: buildfetchmodquerysync

Number of parallel threads to use for the loading/analysis phase.Takes an integer, or a keyword ("auto", "HOST_CPUS", "HOST_RAM"), optionally followed by an operation ([-|*]<float>) eg. "auto", "HOST_CPUS*.5". "auto" sets a reasonable default based on host resources. Must be at least 1.

--loading_phase_threads

Allows multiple
False
Documentation category
execution_strategy
Option effect tags
bazel_internal_configuration

--local_cpu_resources 🔗

Use with: build

Explicitly set the total number of local CPU cores available to Bazel to spend on build actions executed locally. Takes an integer, or "HOST_CPUS", optionally followed by [-|*]<float> (eg. HOST_CPUS*.5 to use half the available CPU cores).By default, ("HOST_CPUS"), Bazel will query system configuration to estimate the number of CPU cores available.

--local_cpu_resources

Allows multiple
False
Documentation category
build_time_optimization
Option effect tags
host_machine_resource_optimizations

--local_extra_resources 🔗

Use with: build

Set the number of extra resources available to Bazel. Takes in a string-float pair. Can be used multiple times to specify multiple types of extra resources. Bazel will limit concurrently running actions based on the available extra resources and the extra resources required. Tests can declare the amount of extra resources they need by using a tag of the "resources:<resoucename>:<amount>" format. Available CPU, RAM and resources cannot be set with this flag.

--local_extra_resources

Allows multiple
True
Documentation category
build_time_optimization
Option effect tags
host_machine_resource_optimizations

--local_ram_resources 🔗

Use with: build

Explicitly set the total amount of local host RAM (in MB) available to Bazel to spend on build actions executed locally. Takes an integer, or "HOST_RAM", optionally followed by [-|*]<float> (eg. HOST_RAM*.5 to use half the available RAM). By default, ("HOST_RAM*.67"), Bazel will query system configuration to estimate the amount of RAM available and will use 67% of it.

--local_ram_resources

Allows multiple
False
Documentation category
build_time_optimization
Option effect tags
host_machine_resource_optimizations

--local_startup_timeout_secs 🔗

Use with: startup

The maximum amount of time the client waits to connect to the server

--local_startup_timeout_secs

Allows multiple
False
Documentation category
bazel_client_options
Option effect tags
bazel_internal_configuration

--local_termination_grace_seconds 🔗

Use with: build

Time to wait between terminating a local process due to timeout and forcefully shutting it down.

--local_termination_grace_seconds

Old name
--local_sigkill_grace_seconds
Warn old name
True
Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown

--local_test_jobs 🔗

Use with: build

The max number of local test jobs to run concurrently. Takes an integer, or a keyword ("auto", "HOST_CPUS", "HOST_RAM"), optionally followed by an operation ([-|*]<float>) eg. "auto", "HOST_CPUS*.5". 0 means local resources will limit the number of local test jobs to run concurrently instead. Setting this greater than the value for --jobs is ineffectual.

--local_test_jobs

Allows multiple
False
Documentation category
testing
Option effect tags
execution

--lockfile_mode 🔗

Use with: common

Specifies how and whether or not to use the lockfile. Valid values are `update` to use the lockfile and update it if there are changes, `error` to use the lockfile but throw an error if it's not up-to-date, or `off` to neither read from or write to the lockfile.

--lockfile_mode

Allows multiple
False
Documentation category
bzlmod
Option effect tags
loading_and_analysis

--log_top_n_packages 🔗

Use with: common

Configures number of packages included in top-package INFO logging, <= 0 disables.

--log_top_n_packages

Allows multiple
False
Documentation category
undocumented
Option effect tags
bazel_monitoring

--logging 🔗

Use with: common

The logging level.

--logging

Allows multiple
False
Documentation category
logging
Option effect tags
affects_outputs

--long 🔗
-l

Use with: help

Show full description of each option, instead of just its name.

--long

Allows multiple
False
Documentation category
logging
Expands to
--help_verbosity=long
Option effect tags
terminal_output

--ltobackendopt 🔗

Use with: configuration

Additional option to pass to the LTO backend step (under --features=thin_lto).

--ltobackendopt

Allows multiple
True
Documentation category
output_parameters
Option effect tags
action_command_linesaffects_outputs

--ltoindexopt 🔗

Use with: configuration

Additional option to pass to the LTO indexing step (under --features=thin_lto).

--ltoindexopt

Allows multiple
True
Documentation category
output_parameters
Option effect tags
action_command_linesaffects_outputs

--macos_cpus 🔗

Use with: configuration

Comma-separated list of architectures for which to build Apple macOS binaries.

--macos_cpus

Allows multiple
True
Documentation category
output_parameters
Option effect tags
loses_incremental_stateloading_and_analysis

--macos_minimum_os 🔗

Use with: configuration

Minimum compatible macOS version for targets. If unspecified, uses 'macos_sdk_version'.

--macos_minimum_os

Allows multiple
False
Documentation category
output_parameters
Option effect tags
loses_incremental_state

--macos_qos_class 🔗

Use with: startup

Sets the QoS service class of the bazel server when running on macOS. This flag has no effect on all other platforms but is supported to ensure rc files can be shared among them without changes. Possible values are: user-interactive, user-initiated, default, utility, and background.

--macos_qos_class

Allows multiple
False
Documentation category
bazel_client_options
Option effect tags
host_machine_resource_optimizations

--macos_sdk_version 🔗

Use with: configuration

Specifies the version of the macOS SDK to use to build macOS applications. If unspecified, uses default macOS SDK version from 'xcode_version'.

--macos_sdk_version

Allows multiple
False
Documentation category
toolchain
Option effect tags
loses_incremental_state

--materialize_param_files 🔗

Use with: build

Writes intermediate parameter files to output tree even when using remote action execution. Useful when debugging actions. This is implied by --subcommands and --verbose_failures.

--[no]materialize_param_files

Allows multiple
False
Documentation category
logging
Option effect tags
execution

--max_computation_steps 🔗

Use with: common

The maximum number of Starlark computation steps that may be executed by a BUILD file (zero means no limit).

--max_computation_steps

Allows multiple
False
Documentation category
starlark_semantics
Option effect tags
build_file_semantics

--max_config_changes_to_show 🔗

Use with: build

When discarding the analysis cache due to a change in the build options, displays up to the given number of changed option names. If the number given is -1, all changed options will be displayed.

--max_config_changes_to_show

Allows multiple
False
Documentation category
logging
Option effect tags
terminal_output

--max_idle_secs 🔗

Use with: startup

The number of seconds the build server will wait idling before shutting down. Zero means that the server will never shutdown. This is only read on server-startup, changing this option will not cause the server to restart.

--max_idle_secs=<integer>

Allows multiple
False
Documentation category
bazel_client_options
Option effect tags
eagerness_to_exitloses_incremental_state

--max_test_output_bytes 🔗

Use with: build

Specifies maximum per-test-log size that can be emitted when --test_output is 'errors' or 'all'. Useful for avoiding overwhelming the output with excessively noisy test output. The test header is included in the log size. Negative values imply no limit. Output is all or nothing.

--max_test_output_bytes

Allows multiple
False
Documentation category
logging
Option effect tags
test_runnerterminal_outputexecution

--memory_profile 🔗

Use with: common

If set, write memory usage data to the specified file at phase ends and stable heap to master log at end of build.

--memory_profile

Allows multiple
False
Documentation category
logging
Option effect tags
bazel_monitoring

--memory_profile_stable_heap_parameters 🔗

Use with: common

Tune memory profile's computation of stable heap at end of build. Should be and even number of integers separated by commas. In each pair the first integer is the number of GCs to perform. The second integer in each pair is the number of seconds to wait between GCs. Ex: 2,4,4,0 would 2 GCs with a 4sec pause, followed by 4 GCs with zero second pause

--memory_profile_stable_heap_parameters

Allows multiple
False
Documentation category
logging
Option effect tags
bazel_monitoring

--memprof_profile 🔗

Use with: configuration

Use memprof profile.

--memprof_profile

Allows multiple
False
Documentation category
output_parameters
Option effect tags
affects_outputs

--merge_android_manifest_permissions 🔗

Use with: configuration

If enabled, the manifest merger will merge uses-permission and uses-permission-sdk-23 attributes.

--[no]merge_android_manifest_permissions

Allows multiple
False
Documentation category
undocumented
Option effect tags
affects_outputs

--min_param_file_size 🔗

Use with: configuration

Minimum command line length before creating a parameter file.

--min_param_file_size

Allows multiple
False
Documentation category
undocumented
Option effect tags
loading_and_analysisexecutionaction_command_lines

--minimum_os_version 🔗

Use with: configuration

The minimum OS version which your compilation targets.

--minimum_os_version

Allows multiple
False
Documentation category
toolchain
Option effect tags
loading_and_analysisaffects_outputs

--mobile_install_aspect 🔗

Use with: mobile-install

The aspect to use for mobile-install.

--mobile_install_aspect

Allows multiple
False
Documentation category
undocumented
Option effect tags
loading_and_analysischanges_inputs

--mobile_install_run_deployer 🔗

Use with: mobile-install

Whether to run the mobile-install deployer after building all artifacts.

--[no]mobile_install_run_deployer

Allows multiple
False
Documentation category
undocumented
Option effect tags
loading_and_analysisaffects_outputsexecution

--mobile_install_supported_rules 🔗

Use with: mobile-install

The supported rules for mobile-install.

--mobile_install_supported_rules

Allows multiple
False
Documentation category
undocumented
Option effect tags
loading_and_analysis

--mode 🔗

Use with: mobile-install

Select how to run mobile-install. "classic" runs the current version of mobile-install. "skylark" uses the new Starlark version, which has support for android_test.

--mode

Allows multiple
False
Documentation category
execution_strategy
Option effect tags
loading_and_analysisexecution
Option metadata tags
incompatible_change

--modify_execution_info 🔗

Use with: configuration

Add or remove keys from an action's execution info based on action mnemonic. Applies only to actions which support execution info. Many common actions support execution info, e.g. Genrule, CppCompile, Javac, StarlarkAction, TestRunner. When specifying multiple values, order matters because many regexes may apply to the same mnemonic. Syntax: "regex=[+-]key,regex=[+-]key,...". Examples: '.*=+x,.*=-y,.*=+z' adds 'x' and 'z' to, and removes 'y' from, the execution info for all actions. 'Genrule=+requires-x' adds 'requires-x' to the execution info for all Genrule actions. '(?!Genrule).*=-requires-x' removes 'requires-x' from the execution info for all non-Genrule actions.

--modify_execution_info

Allows multiple
False
Documentation category
execution_strategy
Option effect tags
executionaffects_outputsloading_and_analysis

--nested_set_depth_limit 🔗

Use with: common

The maximum depth of the graph internal to a depset (also known as NestedSet), above which the depset() constructor will fail.

--nested_set_depth_limit

Allows multiple
False
Documentation category
starlark_semantics
Option effect tags
loading_and_analysis

--nodep_deps 🔗

Use with: aquerycqueryquery

If enabled, deps from "nodep" attributes will be included in the dependency graph over which the query operates. A common example of a "nodep" attribute is "visibility". Run and parse the output of `info build-language` to learn about all the "nodep" attributes in the build language.

--[no]nodep_deps

Allows multiple
False
Documentation category
query
Option effect tags
build_file_semantics

--non_incremental_per_target_dexopts 🔗

Use with: configuration

dx flags that that prevent incremental dexing for binary targets that list any of the flags listed here in their 'dexopts' attribute, which are ignored with incremental dexing (superseding --dexopts_supported_in_incremental_dexing). Defaults to --positions for safety but can in general be used to make sure the listed dx flags are honored, with additional build latency. Please notify us if you find yourself needing this flag.

--non_incremental_per_target_dexopts

Allows multiple
False
Documentation category
undocumented
Option effect tags
loading_and_analysisloses_incremental_state

--noorder_results 🔗

Use with: query

Output the results in dependency-ordered (default) or unordered fashion. The unordered output is faster but only supported when --output is not minrank, maxrank, or graph.

--noorder_results

Allows multiple
False
Deprecation warning
Please use --order_output=no or --order_output=auto instead of this flag
Documentation category
query
Expands to
--order_output=no
Option effect tags
terminal_output

--null 🔗

Use with: query

Whether each format is terminated with \0 instead of newline.

--null

Allows multiple
False
Documentation category
query
Expands to
--line_terminator_null=true
Option effect tags
terminal_output

--objc_debug_with_GLIBCXX 🔗

Use with: configuration

If set, and compilation mode is set to 'dbg', define GLIBCXX_DEBUG, GLIBCXX_DEBUG_PEDANTIC and GLIBCPP_CONCEPT_CHECKS.

--[no]objc_debug_with_GLIBCXX

Allows multiple
False
Documentation category
output_parameters
Option effect tags
action_command_lines

--objc_enable_binary_stripping 🔗

Use with: configuration

Whether to perform symbol and dead-code strippings on linked binaries. Binary strippings will be performed if both this flag and --compilation_mode=opt are specified.

--[no]objc_enable_binary_stripping

Allows multiple
False
Documentation category
output_parameters
Option effect tags
action_command_lines

--objc_generate_linkmap 🔗

Use with: configuration

Specifies whether to generate a linkmap file.

--[no]objc_generate_linkmap

Allows multiple
False
Documentation category
output_selection
Option effect tags
affects_outputs

--objc_use_dotd_pruning 🔗

Use with: configuration

If set, .d files emitted by clang will be used to prune the set of inputs passed into objc compiles.

--[no]objc_use_dotd_pruning

Allows multiple
False
Documentation category
build_time_optimization
Option effect tags
changes_inputsloading_and_analysis

--objccopt 🔗

Use with: configuration

Additional options to pass to gcc when compiling Objective-C/C++ source files.

--objccopt

Allows multiple
True
Documentation category
output_parameters
Option effect tags
action_command_lines

--one_version_enforcement_on_java_tests 🔗

Use with: configuration

When enabled, and with experimental_one_version_enforcement set to a non-NONE value, enforce one version on java_test targets. This flag can be disabled to improve incremental test performance at the expense of missing potential one version violations.

--[no]one_version_enforcement_on_java_tests

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown

--only 🔗

Use with: sync

If this option is given, only sync the repositories specified with this option. Still consider all (or all configure-like, of --configure is given) outdated.

--only

Allows multiple
True
Documentation category
execution_strategy
Option effect tags
changes_inputs

--optimizing_dexer 🔗

Use with: configuration

Specifies a binary to use to do dexing without sharding.

--optimizing_dexer

Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown

--order_output 🔗

Use with: query

Output the results unordered (no), dependency-ordered (deps), or fully ordered (full). The default is 'auto', meaning that results are output either dependency-ordered or fully ordered, depending on the output formatter (dependency-ordered for proto, minrank, maxrank, and graph, fully ordered for all others). When output is fully ordered, nodes are printed in a fully deterministic (total) order. First, all nodes are sorted alphabetically. Then, each node in the list is used as the start of a post-order depth-first search in which outgoing edges to unvisited nodes are traversed in alphabetical order of the successor nodes. Finally, nodes are printed in the reverse of the order in which they were visited.

--order_output

Allows multiple
False
Documentation category
query
Option effect tags
terminal_output

--order_results 🔗

Use with: query

Output the results in dependency-ordered (default) or unordered fashion. The unordered output is faster but only supported when --output is not minrank, maxrank, or graph.

--order_results

Allows multiple
False
Deprecation warning
Please use --order_output=auto or --order_output=no instead of this flag
Documentation category
query
Expands to
--order_output=auto
Option effect tags
terminal_output

--output 🔗

Use with: aqueryconfigcquerymodquery

The format in which the aquery results should be printed. Allowed values for aquery are: text, textproto, proto, streamed_proto, jsonproto.

--output

Allows multiple
False
Documentation category
query
Option effect tags
terminal_output

--output_base 🔗

Use with: startup

If set, specifies the output location to which all build output will be written. Otherwise, the location will be ${OUTPUT_ROOT}/_blaze_${USER}/${MD5_OF_WORKSPACE_ROOT}. Note: If you specify a different option from one to the next Bazel invocation for this value, you'll likely start up a new, additional Bazel server. Bazel starts exactly one server per specified output base. Typically there is one output base per workspace - however, with this option you may have multiple output bases per workspace and thereby run multiple builds for the same client on the same machine concurrently. See 'bazel help shutdown' on how to shutdown a Bazel server.

--output_base=<path>

Allows multiple
False
Documentation category
bazel_client_options
Option effect tags
affects_outputsloses_incremental_state

--output_filter 🔗

Use with: build

Only shows warnings and action outputs for rules with a name matching the provided regular expression.

--output_filter

Allows multiple
False
Documentation category
logging
Option effect tags
affects_outputs

--output_groups 🔗

Use with: build

A list of comma-separated output group names, each of which optionally prefixed by a + or a -. A group prefixed by + is added to the default set of output groups, while a group prefixed by - is removed from the default set. If at least one group is not prefixed, the default set of output groups is omitted. For example, --output_groups=+foo,+bar builds the union of the default set, foo, and bar, while --output_groups=foo,bar overrides the default set such that only foo and bar are built.

--output_groups

Allows multiple
True
Documentation category
output_selection
Option effect tags
executionaffects_outputs

--output_library_merged_assets 🔗

Use with: configuration

If disabled, does not produce merged asset.zip outputs for library targets

--[no]output_library_merged_assets

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown

--output_tree_tracking 🔗

Use with: build

If set, tell the output service (if any) to track when files in the output tree have been modified externally (not by the build system). This should improve incremental build speed when an appropriate output service is enabled.

--[no]output_tree_tracking

Old name
--[no]experimental_output_tree_tracking
Warn old name
True
Allows multiple
False
Documentation category
undocumented
Option effect tags
bazel_internal_configuration

--output_user_root 🔗

Use with: startup

The user-specific directory beneath which all build outputs are written; by default, this is a function of $USER, but by specifying a constant, build outputs can be shared between collaborating users.

--output_user_root=<path>

Allows multiple
False
Documentation category
bazel_client_options
Option effect tags
affects_outputsloses_incremental_state

--override_module 🔗

Use with: common

Override a module with a local path in the form of <module name>=<path>. If the given path is an absolute path, it will be used as it is. If the given path is a relative path, it is relative to the current working directory. If the given path starts with '%workspace%, it is relative to the workspace root, which is the output of `bazel info workspace`

--override_module

Allows multiple
True
Documentation category
bzlmod
Option effect tags
unknown

--override_repository 🔗

Use with: common

Override a repository with a local path in the form of <repository name>=<path>. If the given path is an absolute path, it will be used as it is. If the given path is a relative path, it is relative to the current working directory. If the given path starts with '%workspace%, it is relative to the workspace root, which is the output of `bazel info workspace`

--override_repository

Allows multiple
True
Documentation category
uncategorized
Option effect tags
unknown

--package_path 🔗

Use with: buildcanonicalize-flagsfetchmodquerysync

A colon-separated list of where to look for packages. Elements beginning with '%workspace%' are relative to the enclosing workspace. If omitted or empty, the default is the output of 'bazel info default-package-path'.

--package_path

Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown

--packages 🔗

Use with: dump

Dump package cache content.

--[no]packages

Allows multiple
False
Documentation category
output_selection
Option effect tags
bazel_monitoring

--per_file_copt 🔗

Use with: configuration

Additional options to selectively pass to gcc when compiling certain files. This option can be passed multiple times. Syntax: regex_filter@option_1,option_2,...,option_n. Where regex_filter stands for a list of include and exclude regular expression patterns (Also see --instrumentation_filter). option_1 to option_n stand for arbitrary command line options. If an option contains a comma it has to be quoted with a backslash. Options can contain @. Only the first @ is used to split the string. Example: --per_file_copt=//foo/.*\.cc,-//foo/bar\.cc@-O0 adds the -O0 command line option to the gcc command line of all cc files in //foo/ except bar.cc.

--per_file_copt

Allows multiple
True
Documentation category
output_parameters
Option effect tags
action_command_linesaffects_outputs

--per_file_ltobackendopt 🔗

Use with: configuration

Additional options to selectively pass to LTO backend (under --features=thin_lto) when compiling certain backend objects. This option can be passed multiple times. Syntax: regex_filter@option_1,option_2,...,option_n. Where regex_filter stands for a list of include and exclude regular expression patterns. option_1 to option_n stand for arbitrary command line options. If an option contains a comma it has to be quoted with a backslash. Options can contain @. Only the first @ is used to split the string. Example: --per_file_ltobackendopt=//foo/.*\.o,-//foo/bar\.o@-O0 adds the -O0 command line option to the LTO backend command line of all o files in //foo/ except bar.o.

--per_file_ltobackendopt

Allows multiple
True
Documentation category
output_parameters
Option effect tags
action_command_linesaffects_outputs

--persistent_android_dex_desugar 🔗

Use with: configuration

Enable persistent Android dex and desugar actions by using workers.

--persistent_android_dex_desugar

Allows multiple
False
Documentation category
execution_strategy
Expands to
--internal_persistent_android_dex_desugar
--strategy=Desugar=worker
--strategy=DexBuilder=worker
Option effect tags
host_machine_resource_optimizationsexecution

--persistent_android_resource_processor 🔗

Use with: configuration

Enable persistent Android resource processor by using workers.

--persistent_android_resource_processor

Allows multiple
False
Documentation category
execution_strategy
Expands to
--internal_persistent_busybox_tools
--strategy=AaptPackage=worker
--strategy=AndroidResourceParser=worker
--strategy=AndroidResourceValidator=worker
--strategy=AndroidResourceCompiler=worker
--strategy=RClassGenerator=worker
--strategy=AndroidResourceLink=worker
--strategy=AndroidAapt2=worker
--strategy=AndroidAssetMerger=worker
--strategy=AndroidResourceMerger=worker
--strategy=AndroidCompiledResourceMerger=worker
--strategy=ManifestMerger=worker
--strategy=AndroidManifestMerger=worker
--strategy=Aapt2Optimize=worker
--strategy=AARGenerator=worker
--strategy=ProcessDatabinding=worker
--strategy=GenerateDataBindingBaseClasses=worker
Option effect tags
host_machine_resource_optimizationsexecution

--persistent_multiplex_android_dex_desugar 🔗

Use with: configuration

Enable persistent multiplexed Android dex and desugar actions by using workers.

--persistent_multiplex_android_dex_desugar

Allows multiple
False
Documentation category
execution_strategy
Expands to
--persistent_android_dex_desugar
--internal_persistent_multiplex_android_dex_desugar
Option effect tags
host_machine_resource_optimizationsexecution

--persistent_multiplex_android_resource_processor 🔗

Use with: configuration

Enable persistent multiplexed Android resource processor by using workers.

--persistent_multiplex_android_resource_processor

Allows multiple
False
Documentation category
execution_strategy
Expands to
--persistent_android_resource_processor
--modify_execution_info=AaptPackage=+supports-multiplex-workers
--modify_execution_info=AndroidResourceParser=+supports-multiplex-workers
--modify_execution_info=AndroidResourceValidator=+supports-multiplex-workers
--modify_execution_info=AndroidResourceCompiler=+supports-multiplex-workers
--modify_execution_info=RClassGenerator=+supports-multiplex-workers
--modify_execution_info=AndroidResourceLink=+supports-multiplex-workers
--modify_execution_info=AndroidAapt2=+supports-multiplex-workers
--modify_execution_info=AndroidAssetMerger=+supports-multiplex-workers
--modify_execution_info=AndroidResourceMerger=+supports-multiplex-workers
--modify_execution_info=AndroidCompiledResourceMerger=+supports-multiplex-workers
--modify_execution_info=ManifestMerger=+supports-multiplex-workers
--modify_execution_info=AndroidManifestMerger=+supports-multiplex-workers
--modify_execution_info=Aapt2Optimize=+supports-multiplex-workers
--modify_execution_info=AARGenerator=+supports-multiplex-workers
Option effect tags
host_machine_resource_optimizationsexecution

--persistent_multiplex_android_tools 🔗

Use with: configuration

Enable persistent and multiplexed Android tools (dexing, desugaring, resource processing).

--persistent_multiplex_android_tools

Allows multiple
False
Documentation category
execution_strategy
Expands to
--internal_persistent_multiplex_busybox_tools
--persistent_multiplex_android_resource_processor
--persistent_multiplex_android_dex_desugar
Option effect tags
host_machine_resource_optimizationsexecution

--platform_mappings 🔗

Use with: configuration

The location of a mapping file that describes which platform to use if none is set or which flags to set when a platform already exists. Must be relative to the main workspace root. Defaults to 'platform_mappings' (a file directly under the workspace root).

--platform_mappings

Allows multiple
False
Documentation category
toolchain
Option effect tags
affects_outputschanges_inputsloading_and_analysis

--platform_suffix 🔗

Use with: configuration

Specifies a suffix to be added to the configuration directory.

--platform_suffix

Allows multiple
False
Documentation category
output_parameters
Option effect tags
loses_incremental_stateaffects_outputsloading_and_analysis

--platforms 🔗

Use with: configuration

The labels of the platform rules describing the target platforms for the current command.

--platforms

Old name
--experimental_platforms
Warn old name
True
Allows multiple
False
Documentation category
toolchain
Option effect tags
affects_outputschanges_inputsloading_and_analysis

--plugin 🔗

Use with: configuration

Plugins to use in the build. Currently works with java_plugin.

--plugin

Allows multiple
True
Documentation category
uncategorized
Option effect tags
unknown

--preemptible 🔗

Use with: startup

If true, the command can be preempted if another command is started.

--[no]preemptible

Allows multiple
False
Documentation category
bazel_client_options
Option effect tags
eagerness_to_exit

--print_action_mnemonics 🔗

Use with: print_action

Lists which mnemonics to filter print_action data by, no filtering takes place when left empty.

--print_action_mnemonics

Allows multiple
True
Documentation category
uncategorized
Option effect tags
unknown

--print_relative_test_log_paths 🔗

Use with: test

If true, when printing the path to a test log, use relative path that makes use of the 'testlogs' convenience symlink. N.B. - A subsequent 'build'/'test'/etc invocation with a different configuration can cause the target of this symlink to change, making the path printed previously no longer useful.

--[no]print_relative_test_log_paths

Allows multiple
False
Documentation category
logging
Option effect tags
affects_outputs

--process_headers_in_dependencies 🔗

Use with: configuration

When building a target //a:a, process headers in all targets that //a:a depends on (if header processing is enabled for the toolchain).

--[no]process_headers_in_dependencies

Allows multiple
False
Documentation category
build_time_optimization
Option effect tags
execution

--profile 🔗

Use with: common

If set, profile Bazel and write data to the specified file. Use bazel analyze-profile to analyze the profile.

--profile

Allows multiple
False
Documentation category
logging
Option effect tags
bazel_monitoring

--progress_in_terminal_title 🔗

Use with: common

Show the command progress in the terminal title. Useful to see what bazel is doing when having multiple terminal tabs.

--[no]progress_in_terminal_title

Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown

--progress_report_interval 🔗

Use with: build

The number of seconds to wait between reports on still running jobs. The default value 0 means the first report will be printed after 10 seconds, then 30 seconds and after that progress is reported once every minute. When --curses is enabled, progress is reported every second.

--progress_report_interval

Allows multiple
False
Documentation category
logging
Option effect tags
affects_outputs

--proguard_top 🔗

Use with: configuration

Specifies which version of ProGuard to use for code removal when building a Java binary.

--proguard_top

Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown

--propeller_optimize 🔗

Use with: configuration

Use Propeller profile information to optimize the build target.A propeller profile must consist of at least one of two files, a cc profile and a ld profile. This flag accepts a build label which must refer to the propeller profile input files. For example, the BUILD file that defines the label, in a/b/BUILD:propeller_optimize( name = "propeller_profile", cc_profile = "propeller_cc_profile.txt", ld_profile = "propeller_ld_profile.txt",)An exports_files directive may have to be added to the corresponding package to make these files visible to Bazel. The option must be used as: --propeller_optimize=//a/b:propeller_profile

--propeller_optimize

Allows multiple
False
Documentation category
output_parameters
Option effect tags
action_command_linesaffects_outputs

--propeller_optimize_absolute_cc_profile 🔗

Use with: configuration

Absolute path name of cc_profile file for Propeller Optimized builds.

--propeller_optimize_absolute_cc_profile

Allows multiple
False
Documentation category
output_parameters
Option effect tags
affects_outputs

--propeller_optimize_absolute_ld_profile 🔗

Use with: configuration

Absolute path name of ld_profile file for Propeller Optimized builds.

--propeller_optimize_absolute_ld_profile

Allows multiple
False
Documentation category
output_parameters
Option effect tags
affects_outputs

--proto:default_values 🔗

Use with: aquerycqueryquery

If true, attributes whose value is not explicitly specified in the BUILD file are included; otherwise they are omitted. This option is applicable to --output=proto

--[no]proto:default_values

Allows multiple
False
Documentation category
query
Option effect tags
terminal_output

--proto:definition_stack 🔗

Use with: aquerycqueryquery

Populate the definition_stack proto field, which records for each rule instance the Starlark call stack at the moment the rule's class was defined.

--[no]proto:definition_stack

Allows multiple
False
Documentation category
query
Option effect tags
terminal_output

--proto:flatten_selects 🔗

Use with: aquerycqueryquery

If enabled, configurable attributes created by select() are flattened. For list types the flattened representation is a list containing each value of the select map exactly once. Scalar types are flattened to null.

--[no]proto:flatten_selects

Allows multiple
False
Documentation category
query
Option effect tags
build_file_semantics

--proto:include_attribute_source_aspects 🔗

Use with: aquerycqueryquery

Populate the source_aspect_name proto field of each Attribute with the source aspect that the attribute came from (empty string if it did not).

--[no]proto:include_attribute_source_aspects

Allows multiple
False
Documentation category
query
Option effect tags
terminal_output

--proto:include_configurations 🔗

Use with: cquery

if enabled, proto output will include information about configurations. When disabled,cquery proto output format resembles query output format.

--[no]proto:include_configurations

Allows multiple
False
Documentation category
query
Option effect tags
affects_outputs

--proto:include_synthetic_attribute_hash 🔗

Use with: aquerycqueryquery

Whether or not to calculate and populate the $internal_attr_hash attribute.

--[no]proto:include_synthetic_attribute_hash

Allows multiple
False
Documentation category
query
Option effect tags
terminal_output

--proto:instantiation_stack 🔗

Use with: aquerycqueryquery

Populate the instantiation call stack of each rule. Note that this requires the stack to be present

--[no]proto:instantiation_stack

Allows multiple
False
Documentation category
query
Option effect tags
terminal_output

--proto:locations 🔗

Use with: aquerycqueryquery

Whether to output location information in proto output at all.

--[no]proto:locations

Allows multiple
False
Documentation category
query
Option effect tags
terminal_output

--proto:output_rule_attrs 🔗

Use with: aquerycqueryquery

Comma separated list of attributes to include in output. Defaults to all attributes. Set to empty string to not output any attribute. This option is applicable to --output=proto.

--proto:output_rule_attrs

Allows multiple
False
Documentation category
query
Option effect tags
terminal_output

--proto:rule_inputs_and_outputs 🔗

Use with: aquerycqueryquery

Whether or not to populate the rule_input and rule_output fields.

--[no]proto:rule_inputs_and_outputs

Allows multiple
False
Documentation category
query
Option effect tags
terminal_output

--proto_compiler 🔗

Use with: configuration

The label of the proto-compiler.

--proto_compiler

Allows multiple
False
Documentation category
uncategorized
Option effect tags
affects_outputsloading_and_analysis

--proto_toolchain_for_cc 🔗

Use with: configuration

Label of proto_lang_toolchain() which describes how to compile C++ protos

--proto_toolchain_for_cc

Allows multiple
False
Documentation category
uncategorized
Option effect tags
affects_outputsloading_and_analysis

--proto_toolchain_for_j2objc 🔗

Use with: configuration

Label of proto_lang_toolchain() which describes how to compile j2objc protos

--proto_toolchain_for_j2objc

Allows multiple
False
Documentation category
uncategorized
Option effect tags
affects_outputsloading_and_analysis

--proto_toolchain_for_java 🔗

Use with: configuration

Label of proto_lang_toolchain() which describes how to compile Java protos

--proto_toolchain_for_java

Allows multiple
False
Documentation category
uncategorized
Option effect tags
affects_outputsloading_and_analysis

--proto_toolchain_for_javalite 🔗

Use with: configuration

Label of proto_lang_toolchain() which describes how to compile JavaLite protos

--proto_toolchain_for_javalite

Allows multiple
False
Documentation category
uncategorized
Option effect tags
affects_outputsloading_and_analysis

--protocopt 🔗

Use with: configuration

Additional options to pass to the protobuf compiler.

--protocopt

Allows multiple
True
Documentation category
uncategorized
Option effect tags
affects_outputs

--python2_path 🔗

Use with: configuration

Deprecated, no-op. Disabled by `--incompatible_use_python_toolchains`.

--python2_path

Allows multiple
False
Documentation category
toolchain
Option effect tags
no_op
Option metadata tags
deprecated

--python3_path 🔗

Use with: configuration

Deprecated, no-op. Disabled by `--incompatible_use_python_toolchains`.

--python3_path

Allows multiple
False
Documentation category
toolchain
Option effect tags
no_op
Option metadata tags
deprecated

--python_native_rules_allowlist 🔗

Use with: configuration

An allowlist (package_group target) to use when enforcing --incompatible_python_disallow_native_rules.

--python_native_rules_allowlist

Allows multiple
False
Documentation category
input_strictness
Option effect tags
loading_and_analysis

--python_path 🔗

Use with: configuration

The absolute path of the Python interpreter invoked to run Python targets on the target platform. Deprecated; disabled by --incompatible_use_python_toolchains.

--python_path

Allows multiple
False
Documentation category
toolchain
Option effect tags
loading_and_analysisaffects_outputs

--python_top 🔗

Use with: configuration

The label of a py_runtime representing the Python interpreter invoked to run Python targets on the target platform. Deprecated; disabled by --incompatible_use_python_toolchains.

--python_top

Allows multiple
False
Documentation category
toolchain
Option effect tags
loading_and_analysisaffects_outputs

--python_version 🔗

Use with: configuration

The Python major version mode, either `PY2` or `PY3`. Note that this is overridden by `py_binary` and `py_test` targets (even if they don't explicitly specify a version) so there is usually not much reason to supply this flag.

--python_version

Allows multiple
False
Documentation category
generic_inputs
Option effect tags
loading_and_analysisaffects_outputs

--query_file 🔗

Use with: aquerycqueryquery

If set, query will read the query from the file named here, rather than on the command line. It is an error to specify a file here as well as a command-line query.

--query_file

Allows multiple
False
Documentation category
query
Option effect tags
changes_inputs

--record_full_profiler_data 🔗

Use with: common

By default, Bazel profiler will record only aggregated data for fast but numerous events (such as statting the file). If this option is enabled, profiler will record each event - resulting in more precise profiling data but LARGE performance hit. Option only has effect if --profile used as well.

--[no]record_full_profiler_data

Allows multiple
False
Documentation category
logging
Option effect tags
bazel_monitoring

--record_metrics_for_all_packages 🔗

Use with: common

Configures PackageMetrics to record all metrics for all packages. Disables Top-n INFO logging.

--[no]record_metrics_for_all_packages

Allows multiple
False
Documentation category
undocumented
Option effect tags
bazel_monitoring

--registry 🔗

Use with: common

Specifies the registries to use to locate Bazel module dependencies. The order is important: modules will be looked up in earlier registries first, and only fall back to later registries when they're missing from the earlier ones.

--registry

Allows multiple
True
Documentation category
bzlmod
Option effect tags
changes_inputs

--relative_locations 🔗

Use with: aquerycqueryquery

If true, the location of BUILD files in xml and proto outputs will be relative. By default, the location output is an absolute path and will not be consistent across machines. You can set this option to true to have a consistent result across machines.

--[no]relative_locations

Allows multiple
False
Documentation category
query
Option effect tags
terminal_output

--remote_accept_cached 🔗

Use with: buildcommon

Whether to accept remotely cached action results.

--[no]remote_accept_cached

Allows multiple
False
Documentation category
remote
Option effect tags
unknown

--remote_build_event_upload 🔗

Use with: buildcommon

If set to 'all', all local outputs referenced by BEP are uploaded to remote cache. If set to 'minimal', local outputs referenced by BEP are not uploaded to the remote cache, except for files that are important to the consumers of BEP (e.g. test logs and timing profile). bytestream:// scheme is always used for the uri of files even if they are missing from remote cache. Default to 'minimal'.

--remote_build_event_upload

Old name
--experimental_remote_build_event_upload
Warn old name
True
Allows multiple
False
Documentation category
remote
Option effect tags
unknown

--remote_bytestream_uri_prefix 🔗

Use with: buildcommon

The hostname and instance name to be used in bytestream:// URIs that are written into build event streams. This option can be set when builds are performed using a proxy, which causes the values of --remote_executor and --remote_instance_name to no longer correspond to the canonical name of the remote execution service. When not set, it will default to "${hostname}/${instance_name}".

--remote_bytestream_uri_prefix

Allows multiple
False
Documentation category
remote
Option effect tags
unknown

--remote_cache 🔗

Use with: buildcommon

A URI of a caching endpoint. The supported schemas are http, https, grpc, grpcs (grpc with TLS enabled) and unix (local UNIX sockets). If no schema is provided Bazel will default to grpcs. Specify grpc://, http:// or unix: schema to disable TLS. See https://bazel.build/remote/caching

--remote_cache

Old name
--remote_http_cache
Warn old name
True
Allows multiple
False
Documentation category
remote
Option effect tags
unknown

--remote_cache_compression 🔗

Use with: buildcommon

If enabled, compress/decompress cache blobs with zstd.

--[no]remote_cache_compression

Old name
--[no]experimental_remote_cache_compression
Warn old name
True
Allows multiple
False
Documentation category
remote
Option effect tags
unknown

--remote_cache_header 🔗

Use with: buildcommon

Specify a header that will be included in cache requests: --remote_cache_header=Name=Value. 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.

--remote_cache_header

Allows multiple
True
Documentation category
remote
Option effect tags
unknown

--remote_default_exec_properties 🔗

Use with: buildcommon

Set the default exec properties to be used as the remote execution platform if an execution platform does not already set exec_properties.

--remote_default_exec_properties

Allows multiple
True
Documentation category
remote
Option effect tags
affects_outputs

--remote_default_platform_properties 🔗

Use with: buildcommon

Set the default platform properties to be set for the remote execution API, if the execution platform does not already set remote_execution_properties. This value will also be used if the host platform is selected as the execution platform for remote execution.

--remote_default_platform_properties

Old name
--host_platform_remote_properties_override
Warn old name
True
Allows multiple
False
Deprecation warning
--remote_default_platform_properties has been deprecated in favor of --remote_default_exec_properties.
Documentation category
remote
Option effect tags
unknown

--remote_download_all 🔗

Use with: buildcommon

Downloads all remote outputs to the local machine. This flag is an alias for --remote_download_outputs=all.

--remote_download_all

Allows multiple
False
Documentation category
output_parameters
Expands to
--remote_download_outputs=all
Option effect tags
affects_outputs

--remote_download_minimal 🔗

Use with: buildcommon

Does not download any remote build outputs to the local machine. This flag is an alias for --remote_download_outputs=minimal.

--remote_download_minimal

Old name
--experimental_remote_download_minimal
Warn old name
True
Allows multiple
False
Documentation category
output_parameters
Expands to
--remote_download_outputs=minimal
Option effect tags
affects_outputs

--remote_download_outputs 🔗

Use with: buildcommon

If set to 'minimal' doesn't download any remote build outputs to the local machine, except the ones required by local actions. If set to 'toplevel' behaves like'minimal' except that it also downloads outputs of top level targets to the local machine. Both options can significantly reduce build times if network bandwidth is a bottleneck.

--remote_download_outputs

Old name
--experimental_remote_download_outputs
Warn old name
True
Allows multiple
False
Documentation category
output_parameters
Option effect tags
affects_outputs

--remote_download_regex 🔗

Use with: buildcommon

Force Bazel to download the artifacts that match the given regexp. To be used in conjunction with Build without the Bytes (or the internal equivalent) to allow the client to request certain artifacts that might be needed locally (e.g. IDE support). Multiple regexes can be specified by repeating this flag.

--remote_download_regex

Old name
--experimental_remote_download_regex
Warn old name
True
Allows multiple
True
Documentation category
remote
Option effect tags
affects_outputs

Use with: buildcommon

Instead of downloading remote build outputs to the local machine, create symbolic links. The target of the symbolic links can be specified in the form of a template string. This template string may contain {hash} and {size_bytes} that expand to the hash of the object and the size in bytes, respectively. These symbolic links may, for example, point to a FUSE file system that loads objects from the CAS on demand.

--remote_download_symlink_template

Allows multiple
False
Documentation category
output_parameters
Option effect tags
affects_outputs

--remote_download_toplevel 🔗

Use with: buildcommon

Only downloads remote outputs of top level targets to the local machine. This flag is an alias for --remote_download_outputs=toplevel.

--remote_download_toplevel

Old name
--experimental_remote_download_toplevel
Warn old name
True
Allows multiple
False
Documentation category
output_parameters
Expands to
--remote_download_outputs=toplevel
Option effect tags
affects_outputs

--remote_downloader_header 🔗

Use with: buildcommon

Specify a header that will be included in remote downloader requests: --remote_downloader_header=Name=Value. 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.

--remote_downloader_header

Allows multiple
True
Documentation category
remote
Option effect tags
unknown

--remote_exec_header 🔗

Use with: buildcommon

Specify a header that will be included in execution requests: --remote_exec_header=Name=Value. 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.

--remote_exec_header

Allows multiple
True
Documentation category
remote
Option effect tags
unknown

--remote_execution_priority 🔗

Use with: buildcommon

The relative priority of actions to be executed remotely. The semantics of the particular priority values are server-dependent.

--remote_execution_priority

Allows multiple
False
Documentation category
remote
Option effect tags
unknown

--remote_executor 🔗

Use with: buildcommon

HOST or HOST:PORT of a remote execution endpoint. The supported schemas are grpc, grpcs (grpc with TLS enabled) and unix (local UNIX sockets). If no schema is provided Bazel will default to grpcs. Specify grpc:// or unix: schema to disable TLS.

--remote_executor

Allows multiple
False
Documentation category
remote
Option effect tags
unknown

--remote_grpc_log 🔗

Use with: buildcommon

If specified, a path to a file to log gRPC call related details. This log consists of a sequence of serialized com.google.devtools.build.lib.remote.logging.RemoteExecutionLog.LogEntry protobufs with each message prefixed by a varint denoting the size of the following serialized protobuf message, as performed by the method LogEntry.writeDelimitedTo(OutputStream).

--remote_grpc_log

Old name
--experimental_remote_grpc_log
Warn old name
True
Allows multiple
False
Documentation category
remote
Option effect tags
unknown

--remote_header 🔗

Use with: buildcommon

Specify a header that will be included in requests: --remote_header=Name=Value. 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.

--remote_header

Allows multiple
True
Documentation category
remote
Option effect tags
unknown

--remote_instance_name 🔗

Use with: buildcommon

Value to pass as instance_name in the remote execution API.

--remote_instance_name

Allows multiple
False
Documentation category
remote
Option effect tags
unknown

--remote_local_fallback 🔗

Use with: buildcommon

Whether to fall back to standalone local execution strategy if remote execution fails.

--[no]remote_local_fallback

Allows multiple
False
Documentation category
remote
Option effect tags
unknown

--remote_local_fallback_strategy 🔗

Use with: buildcommon

No-op, deprecated. See https://github.com/bazelbuild/bazel/issues/7480 for details.

--remote_local_fallback_strategy

Allows multiple
False
Documentation category
remote
Option effect tags
unknown

--remote_max_connections 🔗

Use with: buildcommon

Limit the max number of concurrent connections to remote cache/executor. By default the value is 100. Setting this to 0 means no limitation. For HTTP remote cache, one TCP connection could handle one request at one time, so Bazel could make up to --remote_max_connections concurrent requests. For gRPC remote cache/executor, one gRPC channel could usually handle 100+ concurrent requests, so Bazel could make around `--remote_max_connections * 100` concurrent requests.

--remote_max_connections

Allows multiple
False
Documentation category
remote
Option effect tags
host_machine_resource_optimizations

--remote_print_execution_messages 🔗

Use with: buildcommon

Choose when to print remote execution messages. Valid values are `failure`, to print only on failures, `success` to print only on successes and `all` to print always.

--remote_print_execution_messages

Allows multiple
False
Documentation category
logging
Option effect tags
terminal_output

--remote_proxy 🔗

Use with: buildcommon

Connect to the remote cache through a proxy. Currently this flag can only be used to configure a Unix domain socket (unix:/path/to/socket).

--remote_proxy

Old name
--remote_cache_proxy
Warn old name
True
Allows multiple
False
Documentation category
remote
Option effect tags
unknown

--remote_result_cache_priority 🔗

Use with: buildcommon

The relative priority of remote actions to be stored in remote cache. The semantics of the particular priority values are server-dependent.

--remote_result_cache_priority

Allows multiple
False
Documentation category
remote
Option effect tags
unknown

--remote_retries 🔗

Use with: buildcommon

The maximum number of attempts to retry a transient error. If set to 0, retries are disabled.

--remote_retries

Old name
--experimental_remote_retry_max_attempts
Warn old name
True
Allows multiple
False
Documentation category
remote
Option effect tags
unknown

--remote_retry_max_delay 🔗

Use with: buildcommon

The maximum backoff delay between remote retry attempts. Following units can be used: Days (d), hours (h), minutes (m), seconds (s), and milliseconds (ms). If the unit is omitted, the value is interpreted as seconds.

--remote_retry_max_delay

Allows multiple
False
Documentation category
remote
Option effect tags
unknown

--remote_timeout 🔗

Use with: buildcommon

The maximum amount of time to wait for remote execution and cache calls. For the REST cache, this is both the connect and the read timeout. Following units can be used: Days (d), hours (h), minutes (m), seconds (s), and milliseconds (ms). If the unit is omitted, the value is interpreted as seconds.

--remote_timeout

Allows multiple
False
Documentation category
remote
Option effect tags
unknown

--remote_upload_local_results 🔗

Use with: buildcommon

Whether to upload locally executed action results to the remote cache if the remote cache supports it and the user is authorized to do so.

--[no]remote_upload_local_results

Allows multiple
False
Documentation category
remote
Option effect tags
unknown

--remote_verify_downloads 🔗

Use with: buildcommon

If set to true, Bazel will compute the hash sum of all remote downloads and discard the remotely cached values if they don't match the expected value.

--[no]remote_verify_downloads

Allows multiple
False
Documentation category
remote
Option effect tags
unknown

--repo 🔗

Use with: fetch

Only fetches the specified repository, which can be either {@apparent_repo_name} or {@@canonical_repo_name}. Only works when --enable_bzlmod is on.

--repo

Allows multiple
True
Documentation category
execution_strategy
Option effect tags
changes_inputs

--repo_env 🔗

Use with: common

Specifies additional environment variables to be available only for repository rules. Note that repository rules see the full environment anyway, but in this way configuration information can be passed to repositories through options without invalidating the action graph.

--repo_env

Allows multiple
True
Documentation category
output_parameters
Option effect tags
action_command_lines

--repository_cache 🔗

Use with: common

Specifies the cache location of the downloaded values obtained during the fetching of external repositories. An empty string as argument requests the cache to be disabled, otherwise the default of '<output_user_root>/cache/repos/v1' is used

--repository_cache

Old name
--experimental_repository_cache
Warn old name
True
Allows multiple
False
Documentation category
bazel_client_options
Option effect tags
bazel_internal_configuration

--repository_disable_download 🔗

Use with: common

If set, downloading using ctx.download{,_and_extract} is not allowed during repository fetching. Note that network access is not completely disabled; ctx.execute could still run an arbitrary executable that accesses the Internet.

--[no]repository_disable_download

Old name
--[no]experimental_repository_disable_download
Warn old name
True
Allows multiple
False
Documentation category
bazel_client_options
Option effect tags
bazel_internal_configuration

--reuse_sandbox_directories 🔗

Use with: build

If set to true, directories used by sandboxed non-worker execution may be reused to avoid unnecessary setup costs.

--[no]reuse_sandbox_directories

Old name
--[no]experimental_reuse_sandbox_directories
Warn old name
False
Allows multiple
False
Documentation category
execution_strategy
Option effect tags
host_machine_resource_optimizationsexecution

--rewind_lost_inputs 🔗

Use with: build

Whether to use action rewinding to recover from lost inputs.

--[no]rewind_lost_inputs

Allows multiple
False
Documentation category
undocumented
Option effect tags
execution

--rule_classes 🔗

Use with: dump

Dump rule classes.

--[no]rule_classes

Allows multiple
False
Documentation category
output_selection
Option effect tags
bazel_monitoring

--rules 🔗

Use with: dump

Dump rules, including counts and memory usage (if memory is tracked).

--[no]rules

Allows multiple
False
Documentation category
output_selection
Option effect tags
bazel_monitoring

--run 🔗

Use with: run

If false, skip running the command line constructed for the built target.

--[no]run

Allows multiple
False
Documentation category
bazel_client_options
Option effect tags
affects_outputs

--run_under 🔗

Use with: configuration

Prefix to insert before the executables for the 'test' and 'run' commands. If the value is 'foo -bar', and the execution command line is 'test_binary -baz', then the final command line is 'foo -bar test_binary -baz'.This can also be a label to an executable target. Some examples are: 'valgrind', 'strace', 'strace -c', 'valgrind --quiet --num-callers=20', '//package:target', '//package:target --options'.

--run_under

Allows multiple
False
Documentation category
output_parameters
Option effect tags
action_command_lines

--run_validations 🔗

Use with: build

Whether to run validation actions as part of the build. See https://bazel.build/extending/rules#validation_actions

--[no]run_validations

Old name
--[no]experimental_run_validations
Warn old name
True
Allows multiple
False
Documentation category
output_selection
Option effect tags
executionaffects_outputs

--runs_per_test 🔗

Use with: configuration

Specifies number of times to run each test. If any of those attempts fail for any reason, the whole test is considered failed. Normally the value specified is just an integer. Example: --runs_per_test=3 will run all tests 3 times. Alternate syntax: regex_filter@runs_per_test. Where runs_per_test stands for an integer value and regex_filter stands for a list of include and exclude regular expression patterns (Also see --instrumentation_filter). Example: --runs_per_test=//foo/.*,-//foo/bar/.*@3 runs all tests in //foo/ except those under foo/bar three times. This option can be passed multiple times. The most recently passed argument that matches takes precedence. If nothing matches, the test is only run once.

--runs_per_test

Allows multiple
True
Documentation category
testing
Option effect tags
unknown

--runs_per_test_detects_flakes 🔗

Use with: configuration

If true, any shard in which at least one run/attempt passes and at least one run/attempt fails gets a FLAKY status.

--[no]runs_per_test_detects_flakes

Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown

--sandbox_add_mount_pair 🔗

Use with: build

Add additional path pair to mount in sandbox.

--sandbox_add_mount_pair

Allows multiple
True
Documentation category
input_strictness
Option effect tags
execution

--sandbox_base 🔗

Use with: build

Lets the sandbox create its sandbox directories underneath this path. Specify a path on tmpfs (like /run/shm) to possibly improve performance a lot when your build / tests have many input files. Note: You need enough RAM and free space on the tmpfs to hold output and intermediate files generated by running actions.

--sandbox_base

Old name
--experimental_sandbox_base
Warn old name
True
Allows multiple
False
Documentation category
execution_strategy
Option effect tags
host_machine_resource_optimizationsexecution

--sandbox_block_path 🔗

Use with: build

For sandboxed actions, disallow access to this path.

--sandbox_block_path

Allows multiple
True
Documentation category
input_strictness
Option effect tags
execution

--sandbox_debug 🔗

Use with: build

Enables debugging features for the sandboxing feature. This includes two things: first, the sandbox root contents are left untouched after a build; and second, prints extra debugging information on execution. This can help developers of Bazel or Starlark rules with debugging failures due to missing input files, etc.

--[no]sandbox_debug

Allows multiple
False
Documentation category
logging
Option effect tags
terminal_output

--sandbox_default_allow_network 🔗

Use with: build

Allow network access by default for actions; this may not work with all sandboxing implementations.

--[no]sandbox_default_allow_network

Old name
--[no]experimental_sandbox_default_allow_network
Warn old name
True
Allows multiple
False
Documentation category
input_strictness
Option effect tags
execution

--sandbox_explicit_pseudoterminal 🔗

Use with: build

Explicitly enable the creation of pseudoterminals for sandboxed actions. Some linux distributions require setting the group id of the process to 'tty' inside the sandbox in order for pseudoterminals to function. If this is causing issues, this flag can be disabled to enable other groups to be used.

--[no]sandbox_explicit_pseudoterminal

Allows multiple
False
Documentation category
execution_strategy
Option effect tags
execution

--sandbox_fake_hostname 🔗

Use with: build

Change the current hostname to 'localhost' for sandboxed actions.

--[no]sandbox_fake_hostname

Allows multiple
False
Documentation category
input_strictness
Option effect tags
execution

--sandbox_fake_username 🔗

Use with: build

Change the current username to 'nobody' for sandboxed actions.

--[no]sandbox_fake_username

Allows multiple
False
Documentation category
input_strictness
Option effect tags
execution

--sandbox_tmpfs_path 🔗

Use with: build

For sandboxed actions, mount an empty, writable directory at this absolute path (if supported by the sandboxing implementation, ignored otherwise).

--sandbox_tmpfs_path

Allows multiple
True
Documentation category
execution_strategy
Option effect tags
host_machine_resource_optimizationsexecution

--sandbox_writable_path 🔗

Use with: build

For sandboxed actions, make an existing directory writable in the sandbox (if supported by the sandboxing implementation, ignored otherwise).

--sandbox_writable_path

Allows multiple
True
Documentation category
input_strictness
Option effect tags
execution

--save_temps 🔗

Use with: configuration

If set, temporary outputs from gcc will be saved. These include .s files (assembler code), .i files (preprocessed C) and .ii files (preprocessed C++).

--[no]save_temps

Allows multiple
False
Documentation category
output_selection
Option effect tags
affects_outputs

--script_path 🔗

Use with: run

If set, write a shell script to the given file which invokes the target. If this option is set, the target is not run from bazel. Use 'bazel run --script_path=foo //foo && ./foo' to invoke target '//foo' This differs from 'bazel run //foo' in that the bazel lock is released and the executable is connected to the terminal's stdin.

--script_path

Allows multiple
False
Documentation category
output_parameters
Option effect tags
affects_outputsexecution

--separate_aspect_deps 🔗

Use with: common

If enabled, the dependencies of the main aspect in an aspect path will be separated from those of the target and the base aspects. ctx.attr.{attr_name} will always get the attribute value from the main aspect and ctx.rule.attr.{attr_name} will get the value from the rule if it has an attribute with that name or from the base aspects attributes (first one in the aspects path wins).

--[no]separate_aspect_deps

Allows multiple
False
Documentation category
starlark_semantics
Option effect tags
loading_and_analysis

--server_javabase 🔗

Use with: startup

Path to the JVM used to execute Bazel itself.

--server_javabase=<jvm path>

Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown

--server_jvm_out 🔗

Use with: startup

The location to write the server's JVM's output. If unset then defaults to a location in output_base.

--server_jvm_out=<path>

Allows multiple
False
Documentation category
bazel_client_options
Option effect tags
affects_outputsloses_incremental_state

--share_native_deps 🔗

Use with: configuration

If true, native libraries that contain identical functionality will be shared among different targets

--[no]share_native_deps

Allows multiple
False
Documentation category
output_parameters
Option effect tags
loading_and_analysisaffects_outputs

--shell_executable 🔗

Use with: configuration

Absolute path to the shell executable for Bazel to use. If this is unset, but the BAZEL_SH environment variable is set on the first Bazel invocation (that starts up a Bazel server), Bazel uses that. If neither is set, Bazel uses a hard-coded default path depending on the operating system it runs on (Windows: c:/tools/msys64/usr/bin/bash.exe, FreeBSD: /usr/local/bin/bash, all others: /bin/bash). Note that using a shell that is not compatible with bash may lead to build failures or runtime failures of the generated binaries.

--shell_executable

Allows multiple
False
Documentation category
uncategorized
Option effect tags
loading_and_analysis

--short 🔗

Use with: help

Show only the names of the options, not their types or meanings.

--short

Allows multiple
False
Documentation category
logging
Expands to
--help_verbosity=short
Option effect tags
terminal_output

--show_config_fragments 🔗

Use with: cquery

Shows the configuration fragments required by a rule and its transitive dependencies. This can be useful for evaluating how much a configured target graph can be trimmed.

--show_config_fragments

Allows multiple
False
Documentation category
query
Option effect tags
affects_outputs

--show_loading_progress 🔗

Use with: buildcanonicalize-flagsfetchmodquerysync

If enabled, causes Bazel to print "Loading package:" messages.

--[no]show_loading_progress

Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown

--show_make_env 🔗

Use with: info

Include the "Make" environment in the output.

--[no]show_make_env

Allows multiple
False
Documentation category
logging
Option effect tags
affects_outputsterminal_output

--show_progress 🔗

Use with: common

Display progress messages during a build.

--[no]show_progress

Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown

--show_progress_rate_limit 🔗

Use with: common

Minimum number of seconds between progress messages in the output.

--show_progress_rate_limit

Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown

--show_result 🔗

Use with: build

Show the results of the build. For each target, state whether or not it was brought up-to-date, and if so, a list of output files that were built. The printed files are convenient strings for copy+pasting to the shell, to execute them. This option requires an integer argument, which is the threshold number of targets above which result information is not printed. Thus zero causes suppression of the message and MAX_INT causes printing of the result to occur always. The default is one. If nothing was built for a target its results may be omitted to keep the output under the threshold.

--show_result

Allows multiple
False
Documentation category
logging
Option effect tags
affects_outputs

--show_timestamps 🔗

Use with: common

Include timestamps in messages

--[no]show_timestamps

Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown

--shutdown_on_low_sys_mem 🔗

Use with: startup

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. Linux only.

--[no]shutdown_on_low_sys_mem

Allows multiple
False
Documentation category
bazel_client_options
Option effect tags
eagerness_to_exitloses_incremental_state

--skip_incompatible_explicit_targets 🔗

Use with: build

Skip incompatible targets that are explicitly listed on the command line. By default, building such targets results in an error but they are silently skipped when this option is enabled. See: https://bazel.build/extending/platforms#skipping-incompatible-targets

--[no]skip_incompatible_explicit_targets

Allows multiple
False
Documentation category
execution_strategy
Option effect tags
loading_and_analysis

--skyframe 🔗

Use with: dump

Dump Skyframe graph: 'off', 'summary', 'count', 'value', 'deps', or 'rdeps'.

--skyframe

Allows multiple
False
Documentation category
output_selection
Option effect tags
bazel_monitoring

--skyframe_high_water_mark_full_gc_drops_per_invocation 🔗

Use with: common

Flag for advanced configuration of Bazel's internal Skyframe engine. If Bazel detects its retained heap percentage usage exceeds the threshold set by --skyframe_high_water_mark_threshold, when a full GC event occurs, it will drop unnecessary temporary Skyframe state, up to this many times per invocation. Defaults to Integer.MAX_VALUE; effectively unlimited. Zero means that full GC events will never trigger drops. If the limit is reached, Skyframe state will no longer be dropped when a full GC event occurs and that retained heap percentage threshold is exceeded.

--skyframe_high_water_mark_full_gc_drops_per_invocation

Allows multiple
False
Documentation category
build_time_optimization
Option effect tags
host_machine_resource_optimizations

--skyframe_high_water_mark_minor_gc_drops_per_invocation 🔗

Use with: common

Flag for advanced configuration of Bazel's internal Skyframe engine. If Bazel detects its retained heap percentage usage exceeds the threshold set by --skyframe_high_water_mark_threshold, when a minor GC event occurs, it will drop unnecessary temporary Skyframe state, up to this many times per invocation. Defaults to Integer.MAX_VALUE; effectively unlimited. Zero means that minor GC events will never trigger drops. If the limit is reached, Skyframe state will no longer be dropped when a minor GC event occurs and that retained heap percentage threshold is exceeded.

--skyframe_high_water_mark_minor_gc_drops_per_invocation

Allows multiple
False
Documentation category
build_time_optimization
Option effect tags
host_machine_resource_optimizations

--skyframe_high_water_mark_threshold 🔗

Use with: common

Flag for advanced configuration of Bazel's internal Skyframe engine. If Bazel detects its retained heap percentage usage is at least this threshold, it will drop unnecessary temporary Skyframe state. Tweaking this may let you mitigate wall time impact of GC thrashing, when the GC thrashing is (i) caused by the memory usage of this temporary state and (ii) more costly than reconstituting the state when it is needed.

--skyframe_high_water_mark_threshold

Allows multiple
False
Documentation category
build_time_optimization
Option effect tags
host_machine_resource_optimizations

--skyframe_state 🔗

Use with: aquery

Without performing extra analysis, dump the current Action Graph from Skyframe. Note: Specifying a target with --skyframe_state is currently not supported. This flag is only available with --output=proto or --output=textproto.

--[no]skyframe_state

Allows multiple
False
Documentation category
query
Option effect tags
terminal_output

--skykey_filter 🔗

Use with: dump

Regex filter of SkyKey names to output. Only used with --skyframe=deps, rdeps.

--skykey_filter

Allows multiple
False
Documentation category
output_selection
Option effect tags
bazel_monitoring

--skylark_memory 🔗

Use with: dump

Dumps a pprof-compatible memory profile to the specified path. To learn more please see https://github.com/google/pprof.

--skylark_memory

Allows multiple
False
Documentation category
output_selection
Option effect tags
bazel_monitoring

--slim_profile 🔗

Use with: common

Slims down the size of the JSON profile by merging events if the profile gets too large.

--[no]slim_profile

Old name
--[no]experimental_slim_json_profile
Warn old name
True
Allows multiple
False
Documentation category
logging
Option effect tags
bazel_monitoring

--spawn_strategy 🔗

Use with: build

Specify how spawn actions are executed by default. Accepts a comma-separated list of strategies from highest to lowest priority. For each action Bazel picks the strategy with the highest priority that can execute the action. The default value is "remote,worker,sandboxed,local". See https://blog.bazel.build/2019/06/19/list-strategy.html for details.

--spawn_strategy

Allows multiple
False
Documentation category
execution_strategy
Option effect tags
execution

--split_apks 🔗

Use with: mobile-install

Whether to use split apks to install and update the application on the device. Works only with devices with Marshmallow or later

--[no]split_apks

Allows multiple
False
Documentation category
output_selection
Option effect tags
loading_and_analysisaffects_outputs

--split_bytecode_optimization_pass 🔗

Use with: configuration

Do not use.

--[no]split_bytecode_optimization_pass

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown

--stamp 🔗

Use with: configuration

Stamp binaries with the date, username, hostname, workspace information, etc.

--[no]stamp

Allows multiple
False
Documentation category
output_parameters
Option effect tags
affects_outputs

--starlark:expr 🔗

Use with: cquery

A Starlark expression to format each configured target in cquery's --output=starlark mode. The configured target is bound to 'target'. If neither --starlark:expr nor --starlark:file is specified, this option will default to 'str(target.label)'. It is an error to specify both --starlark:expr and --starlark:file.

--starlark:expr

Allows multiple
False
Documentation category
query
Option effect tags
terminal_output

--starlark:file 🔗

Use with: cquery

The name of a file that defines a Starlark function called 'format', of one argument, that is applied to each configured target to format it as a string. It is an error to specify both --starlark:expr and --starlark:file. See help for --output=starlark for additional detail.

--starlark:file

Allows multiple
False
Documentation category
query
Option effect tags
terminal_output

--starlark_cpu_profile 🔗

Use with: common

Writes into the specified file a pprof profile of CPU usage by all Starlark threads.

--starlark_cpu_profile

Allows multiple
False
Documentation category
logging
Option effect tags
bazel_monitoring

--start 🔗

Use with: mobile-install

How the app should be started after installing it. Set to WARM to preserve and restore application state on incremental installs.

--start

Allows multiple
False
Documentation category
output_parameters
Option effect tags
execution

--start_app 🔗

Use with: mobile-install

Whether to start the app after installing it.

--start_app

Allows multiple
False
Documentation category
output_parameters
Expands to
--start=COLD
Option effect tags
execution

--strategy 🔗

Use with: build

Specify how to distribute compilation of other spawn actions. Accepts a comma-separated list of strategies from highest to lowest priority. For each action Bazel picks the strategy with the highest priority that can execute the action. The default value is "remote,worker,sandboxed,local". This flag overrides the values set by --spawn_strategy (and --genrule_strategy if used with mnemonic Genrule). See https://blog.bazel.build/2019/06/19/list-strategy.html for details.

--strategy

Allows multiple
True
Documentation category
execution_strategy
Option effect tags
execution

--strategy_regexp 🔗

Use with: build

Override which spawn strategy should be used to execute spawn actions that have descriptions matching a certain regex_filter. See --per_file_copt for details onregex_filter matching. The last regex_filter that matches the description is used. This option overrides other flags for specifying strategy. Example: --strategy_regexp=//foo.*\.cc,-//foo/bar=local means to run actions using local strategy if their descriptions match //foo.*.cc but not //foo/bar. Example: --strategy_regexp='Compiling.*/bar=local --strategy_regexp=Compiling=sandboxed will run 'Compiling //foo/bar/baz' with the 'local' strategy, but reversing the order would run it with 'sandboxed'.

--strategy_regexp

Allows multiple
True
Documentation category
execution_strategy
Option effect tags
execution

--strict_deps_java_protos 🔗

Use with: configuration

When 'strict-deps' is on, .java files that depend on classes not declared in their rule's 'deps' fail to build. In other words, it's forbidden to depend on classes obtained transitively. When true, Java protos are strict regardless of their 'strict_deps' attribute.

--[no]strict_deps_java_protos

Allows multiple
False
Documentation category
undocumented
Option effect tags
build_file_semanticseagerness_to_exit

--strict_filesets 🔗

Use with: configuration

If this option is enabled, filesets crossing package boundaries are reported as errors.

--[no]strict_filesets

Allows multiple
False
Documentation category
input_strictness
Option effect tags
build_file_semanticseagerness_to_exit

--strict_proto_deps 🔗

Use with: configuration

Unless OFF, checks that a proto_library target explicitly declares all directly used targets as dependencies.

--strict_proto_deps

Allows multiple
False
Documentation category
input_strictness
Option effect tags
build_file_semanticseagerness_to_exit
Option metadata tags
incompatible_change

--strict_public_imports 🔗

Use with: configuration

Unless OFF, checks that a proto_library target explicitly declares all targets used in 'import public' as exported.

--strict_public_imports

Allows multiple
False
Documentation category
input_strictness
Option effect tags
build_file_semanticseagerness_to_exit
Option metadata tags
incompatible_change

--strict_system_includes 🔗

Use with: configuration

If true, headers found through system include paths (-isystem) are also required to be declared.

--[no]strict_system_includes

Allows multiple
False
Documentation category
input_strictness
Option effect tags
loading_and_analysiseagerness_to_exit

--strict_test_suite 🔗

Use with: query

If true, the tests() expression gives an error if it encounters a test_suite containing non-test targets.

--[no]strict_test_suite

Allows multiple
False
Documentation category
query
Option effect tags
build_file_semanticseagerness_to_exit

--strip 🔗

Use with: configuration

Specifies whether to strip binaries and shared libraries (using "-Wl,--strip-debug"). The default value of 'sometimes' means strip iff --compilation_mode=fastbuild.

--strip

Allows multiple
False
Documentation category
output_parameters
Option effect tags
affects_outputs

--stripopt 🔗

Use with: configuration

Additional options to pass to strip when generating a '<name>.stripped' binary.

--stripopt

Allows multiple
True
Documentation category
output_parameters
Option effect tags
action_command_linesaffects_outputs

--subcommands 🔗
-s

Use with: build

Display the subcommands executed during a build. Related flags: --execution_log_json_file, --execution_log_binary_file (for logging subcommands to a file in a tool-friendly format).

--subcommands

Allows multiple
False
Documentation category
logging
Option effect tags
terminal_output

--swiftcopt 🔗

Use with: configuration

Additional options to pass to Swift compilation.

--swiftcopt

Allows multiple
True
Documentation category
output_parameters
Option effect tags
action_command_lines

Use with: build

The prefix that is prepended to any of the convenience symlinks that are created after a build. If omitted, the default value is the name of the build tool followed by a hyphen. If '/' is passed, then no symlinks are created and no warning is emitted. Warning: the special functionality for '/' will be deprecated soon; use --experimental_convenience_symlinks=ignore instead.

--symlink_prefix

Allows multiple
False
Documentation category
output_parameters
Option effect tags
affects_outputs

--system_rc 🔗

Use with: startup

Whether or not to look for the system-wide bazelrc.

--[no]system_rc

Allows multiple
False
Documentation category
bazel_client_options
Option effect tags
changes_inputs

--target_environment 🔗

Use with: configuration

Declares this build's target environment. Must be a label reference to an "environment" rule. If specified, all top-level targets must be compatible with this environment.

--target_environment

Allows multiple
True
Documentation category
input_strictness
Option effect tags
changes_inputs

--target_pattern_file 🔗

Use with: build

If set, build will read patterns from the file named here, rather than on the command line. It is an error to specify a file here as well as command-line patterns.

--target_pattern_file

Allows multiple
False
Documentation category
generic_inputs
Option effect tags
changes_inputs

--target_platform_fallback 🔗

Use with: build

This option is deprecated and has no effect.

--target_platform_fallback

Allows multiple
False
Documentation category
toolchain
Option effect tags
affects_outputschanges_inputsloading_and_analysis

--test_arg 🔗

Use with: configuration

Specifies additional options and arguments that should be passed to the test executable. Can be used multiple times to specify several arguments. If multiple tests are executed, each of them will receive identical arguments. Used only by the 'bazel test' command.

--test_arg

Allows multiple
True
Documentation category
uncategorized
Option effect tags
unknown

--test_env 🔗

Use with: configuration

Specifies additional environment variables to be injected into the test runner environment. Variables can be either specified by name, in which case its value will be read from the Bazel client environment, or by the name=value pair. This option can be used multiple times to specify several variables. Used only by the 'bazel test' command.

--test_env

Allows multiple
True
Documentation category
testing
Option effect tags
test_runner

--test_filter 🔗

Use with: configuration

Specifies a filter to forward to the test framework. Used to limit the tests run. Note that this does not affect which targets are built.

--test_filter

Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown

--test_keep_going 🔗

Use with: build

When disabled, any non-passing test will cause the entire build to stop. By default all tests are run, even if some do not pass.

--[no]test_keep_going

Allows multiple
False
Documentation category
testing
Option effect tags
execution

--test_lang_filters 🔗

Use with: build

Specifies a comma-separated list of test languages. Each language can be optionally preceded with '-' to specify excluded languages. Only those test targets will be found that are written in the specified languages. The name used for each language should be the same as the language prefix in the *_test rule, e.g. one of 'cc', 'java', 'py', etc. This option affects --build_tests_only behavior and the test command.

--test_lang_filters

Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown

--test_output 🔗

Use with: build

Specifies desired output mode. Valid values are 'summary' to output only test status summary, 'errors' to also print test logs for failed tests, 'all' to print logs for all tests and 'streamed' to output logs for all tests in real time (this will force tests to be executed locally one at a time regardless of --test_strategy value).

--test_output

Allows multiple
False
Documentation category
logging
Option effect tags
test_runnerterminal_outputexecution

--test_result_expiration 🔗

Use with: configuration

This option is deprecated and has no effect.

--test_result_expiration

Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown

--test_runner_fail_fast 🔗

Use with: configuration

Forwards fail fast option to the test runner. The test runner should stop execution upon first failure.

--[no]test_runner_fail_fast

Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown

--test_sharding_strategy 🔗

Use with: configuration

Specify strategy for test sharding: 'explicit' to only use sharding if the 'shard_count' BUILD attribute is present. 'disabled' to never use test sharding. 'forced=k' to enforce 'k' shards for testing regardless of the 'shard_count' BUILD attribute.

--test_sharding_strategy

Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown

--test_size_filters 🔗

Use with: build

Specifies a comma-separated list of test sizes. Each size can be optionally preceded with '-' to specify excluded sizes. Only those test targets will be found that contain at least one included size and do not contain any excluded sizes. This option affects --build_tests_only behavior and the test command.

--test_size_filters

Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown

--test_strategy 🔗

Use with: build

Specifies which strategy to use when running tests.

--test_strategy

Allows multiple
False
Documentation category
testing
Option effect tags
execution

--test_summary 🔗

Use with: build

Specifies the desired format of the test summary. Valid values are 'short' to print information only about tests executed, 'terse', to print information only about unsuccessful tests that were run, 'detailed' to print detailed information about failed test cases, 'testcase' to print summary in test case resolution, do not print detailed information about failed test cases and 'none' to omit the summary.

--test_summary

Allows multiple
False
Documentation category
logging
Option effect tags
terminal_output

--test_tag_filters 🔗

Use with: build

Specifies a comma-separated list of test tags. Each tag can be optionally preceded with '-' to specify excluded tags. Only those test targets will be found that contain at least one included tag and do not contain any excluded tags. This option affects --build_tests_only behavior and the test command.

--test_tag_filters

Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown

--test_timeout 🔗

Use with: configuration

Override the default test timeout values for test timeouts (in secs). If a single positive integer value is specified it will override all categories. If 4 comma-separated integers are specified, they will override the timeouts for short, moderate, long and eternal (in that order). In either form, a value of -1 tells blaze to use its default timeouts for that category.

--test_timeout

Allows multiple
False
Documentation category
testing
Option effect tags
unknown

--test_timeout_filters 🔗

Use with: build

Specifies a comma-separated list of test timeouts. Each timeout can be optionally preceded with '-' to specify excluded timeouts. Only those test targets will be found that contain at least one included timeout and do not contain any excluded timeouts. This option affects --build_tests_only behavior and the test command.

--test_timeout_filters

Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown

--test_tmpdir 🔗

Use with: build

Specifies the base temporary directory for 'bazel test' to use.

--test_tmpdir

Allows multiple
False
Documentation category
testing
Option effect tags
unknown

--test_verbose_timeout_warnings 🔗

Use with: test

If true, print additional warnings when the actual test execution time does not match the timeout defined by the test (whether implied or explicit).

--[no]test_verbose_timeout_warnings

Allows multiple
False
Documentation category
logging
Option effect tags
affects_outputs

--tls_certificate 🔗

Use with: common

Specify a path to a TLS certificate that is trusted to sign server certificates.

--tls_certificate

Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown

--tls_client_certificate 🔗

Use with: common

Specify the TLS client certificate to use; you also need to provide a client key to enable client authentication.

--tls_client_certificate

Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown

--tls_client_key 🔗

Use with: common

Specify the TLS client key to use; you also need to provide a client certificate to enable client authentication.

--tls_client_key

Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown

--tool_deps 🔗

Use with: aquerycqueryquery

Query: If disabled, dependencies on 'exec configuration' will not be included in the dependency graph over which the query operates. An 'exec configuration' dependency edge, such as the one from any 'proto_library' rule to the Protocol Compiler, usually points to a tool executed during the build rather than a part of the same 'target' program. Cquery: If disabled, filters out all configured targets which cross an execution transition from the top-level target that discovered this configured target. That means if the top-level target is in the target configuration, only configured targets also in the target configuration will be returned. If the top-level target is in the exec configuration, only exec configured targets will be returned. This option will NOT exclude resolved toolchains.

--[no]tool_deps

Old name
--[no]host_deps
Warn old name
True
Allows multiple
False
Documentation category
query
Option effect tags
build_file_semantics

--tool_java_language_version 🔗

Use with: configuration

The Java language version used to execute the tools that are needed during a build

--tool_java_language_version

Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown

--tool_java_runtime_version 🔗

Use with: configuration

The Java runtime version used to execute tools during the build

--tool_java_runtime_version

Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown

--tool_tag 🔗

Use with: common

A tool name to attribute this Bazel invocation to.

--tool_tag

Allows multiple
False
Documentation category
logging
Option effect tags
affects_outputsbazel_monitoring

--toolchain_resolution_debug 🔗

Use with: configuration

Print debug information during toolchain resolution. The flag takes a regex, which is checked against toolchain types and specific targets to see which to debug. Multiple regexes may be separated by commas, and then each regex is checked separately. Note: The output of this flag is very complex and will likely only be useful to experts in toolchain resolution.

--toolchain_resolution_debug

Allows multiple
False
Documentation category
logging
Option effect tags
terminal_output

--track_incremental_state 🔗

Use with: common

If false, Blaze will not persist data that allows for invalidation and re-evaluation on incremental builds in order to save memory on this build. Subsequent builds will not have any incrementality with respect to this one. Usually you will want to specify --batch when setting this to false.

--[no]track_incremental_state

Old name
--[no]keep_incrementality_data
Warn old name
True
Allows multiple
False
Documentation category
build_time_optimization
Option effect tags
loses_incremental_state

--transitions 🔗

Use with: cquery

The format in which cquery will print transition information.

--transitions

Allows multiple
False
Documentation category
query
Option effect tags
affects_outputs

--trim_test_configuration 🔗

Use with: configuration

When enabled, test-related options will be cleared below the top level of the build. When this flag is active, tests cannot be built as dependencies of non-test rules, but changes to test-related options will not cause non-test rules to be re-analyzed.

--[no]trim_test_configuration

Allows multiple
False
Documentation category
build_time_optimization
Option effect tags
loading_and_analysisloses_incremental_state

--tvos_cpus 🔗

Use with: configuration

Comma-separated list of architectures for which to build Apple tvOS binaries.

--tvos_cpus

Allows multiple
True
Documentation category
output_parameters
Option effect tags
loses_incremental_stateloading_and_analysis

--tvos_minimum_os 🔗

Use with: configuration

Minimum compatible tvOS version for target simulators and devices. If unspecified, uses 'tvos_sdk_version'.

--tvos_minimum_os

Allows multiple
False
Documentation category
output_parameters
Option effect tags
loses_incremental_state

--tvos_sdk_version 🔗

Use with: configuration

Specifies the version of the tvOS SDK to use to build tvOS applications. If unspecified, uses default tvOS SDK version from 'xcode_version'.

--tvos_sdk_version

Allows multiple
False
Documentation category
toolchain
Option effect tags
loses_incremental_state

--ui_actions_shown 🔗

Use with: common

Number of concurrent actions shown in the detailed progress bar; each action is shown on a separate line. The progress bar always shows at least one one, all numbers less than 1 are mapped to 1.

--ui_actions_shown

Old name
--experimental_ui_actions_shown
Warn old name
True
Allows multiple
False
Documentation category
uncategorized
Option effect tags
terminal_output

--ui_event_filters 🔗

Use with: common

Specifies which events to show in the UI. It is possible to add or remove events to the default ones using leading +/-, or override the default set completely with direct assignment. The set of supported event kinds include INFO, DEBUG, ERROR and more.

--ui_event_filters

Allows multiple
True
Documentation category
logging
Option effect tags
terminal_output

--unconditional_warning 🔗

Use with: common

A warning that will unconditionally get printed with build warnings and errors. This is useful to deprecate bazelrc files or --config definitions. If the intent is to effectively deprecate some flag or combination of flags, this is NOT sufficient. The flag or flags should use the deprecationWarning field in the option definition, or the bad combination should be checked for programmatically.

--unconditional_warning

Allows multiple
True
Documentation category
undocumented
Option effect tags
terminal_output

--universe_scope 🔗

Use with: aquerycqueryquery

A comma-separated set of target patterns (additive and subtractive). The query may be performed in the universe defined by the transitive closure of the specified targets. This option is used for the query and cquery commands. For cquery, the input to this option is the targets all answers are built under and so this option may affect configurations and transitions. If this option is not specified, the top-level targets are assumed to be the targets parsed from the query expression. Note: For cquery, not specifying this option may cause the build to break if targets parsed from the query expression are not buildable with top-level options.

--universe_scope

Allows multiple
False
Documentation category
query
Option effect tags
loading_and_analysis

--unix_digest_hash_attribute_name 🔗

Use with: startup

The name of an extended attribute that can be placed on files to store a precomputed copy of the file's hash, corresponding with --digest_function. This option can be used to reduce disk I/O and CPU load caused by hash computation. This extended attribute is checked on all source files and output files, meaning that it causes a significant number of invocations of the getxattr() system call.

--unix_digest_hash_attribute_name

Allows multiple
False
Documentation category
undocumented
Option effect tags
changes_inputsloses_incremental_state

--unlimit_coredumps 🔗

Use with: startup

Raises the soft coredump limit to the hard limit to make coredumps of the server (including the JVM) and the client possible under common conditions. Stick this flag in your bazelrc once and forget about it so that you get coredumps when you actually encounter a condition that triggers them.

--[no]unlimit_coredumps

Allows multiple
False
Documentation category
bazel_client_options
Option effect tags
bazel_internal_configuration

--use_action_cache 🔗

Use with: build

Whether to use the action cache

--[no]use_action_cache

Allows multiple
False
Documentation category
undocumented
Option effect tags
bazel_internal_configurationhost_machine_resource_optimizations

--use_ijars 🔗

Use with: configuration

If enabled, this option causes Java compilation to use interface jars. This will result in faster incremental compilation, but error messages can be different.

--[no]use_ijars

Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown

--use_target_platform_for_tests 🔗

Use with: configuration

If true, then Bazel will use the target platform for running tests rather than the test exec group.

--[no]use_target_platform_for_tests

Allows multiple
False
Documentation category
execution_strategy
Option effect tags
execution

Use with: build

Deprecated. No-op.

--[no]use_top_level_targets_for_symlinks

Allows multiple
False
Documentation category
undocumented
Option effect tags
affects_outputs

--verbose 🔗

Use with: mod

The queries will also display the reason why modules were resolved to their current version (if changed). Defaults to true only for the explain query.

--[no]verbose

Allows multiple
False
Documentation category
mod_command
Option effect tags
terminal_output

--verbose_explanations 🔗

Use with: build

Increases the verbosity of the explanations issued if --explain is enabled. Has no effect if --explain is not enabled.

--[no]verbose_explanations

Allows multiple
False
Documentation category
logging
Option effect tags
affects_outputs

--verbose_failures 🔗

Use with: build

If a command fails, print out the full command line.

--[no]verbose_failures

Allows multiple
False
Documentation category
logging
Option effect tags
terminal_output

--verbose_test_summary 🔗

Use with: test

If true, print additional information (timing, number of failed runs, etc) in the test summary.

--[no]verbose_test_summary

Allows multiple
False
Documentation category
logging
Option effect tags
affects_outputs

--version_window_for_dirty_node_gc 🔗

Use with: build

Nodes that have been dirty for more than this many versions will be deleted from the graph upon the next update. Values must be non-negative long integers, or -1 indicating the maximum possible window.

--version_window_for_dirty_node_gc

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown

--visionos_cpus 🔗

Use with: configuration

Comma-separated list of architectures for which to build Apple visionOS binaries.

--visionos_cpus

Allows multiple
True
Documentation category
output_parameters
Option effect tags
loses_incremental_stateloading_and_analysis

--watchfs 🔗

Use with: commonstartup

If true, bazel tries to use the operating system's file watch service for local changes instead of scanning every file for a change.

--[no]watchfs

Allows multiple
False
Documentation category
bazel_client_options
Option effect tags
unknown
Option metadata tags
deprecated

--watchos_cpus 🔗

Use with: configuration

Comma-separated list of architectures for which to build Apple watchOS binaries.

--watchos_cpus

Allows multiple
True
Documentation category
output_parameters
Option effect tags
loses_incremental_stateloading_and_analysis

--watchos_minimum_os 🔗

Use with: configuration

Minimum compatible watchOS version for target simulators and devices. If unspecified, uses 'watchos_sdk_version'.

--watchos_minimum_os

Allows multiple
False
Documentation category
output_parameters
Option effect tags
loses_incremental_state

--watchos_sdk_version 🔗

Use with: configuration

Specifies the version of the watchOS SDK to use to build watchOS applications. If unspecified, uses default watchOS SDK version from 'xcode_version'.

--watchos_sdk_version

Allows multiple
False
Documentation category
toolchain
Option effect tags
loses_incremental_state

Use with: startup

If true, real symbolic links will be created on Windows instead of file copying. Requires Windows developer mode to be enabled and Windows 10 version 1703 or greater.

--[no]windows_enable_symlinks

Allows multiple
False
Documentation category
bazel_client_options
Option effect tags
bazel_internal_configuration

--worker_extra_flag 🔗

Use with: build

Extra command-flags that will be passed to worker processes in addition to --persistent_worker, keyed by mnemonic (e.g. --worker_extra_flag=Javac=--debug.

--worker_extra_flag

Allows multiple
True
Documentation category
execution_strategy
Option effect tags
executionhost_machine_resource_optimizations

--worker_max_instances 🔗

Use with: build

How many instances of each kind of persistent worker may be launched if you use the 'worker' strategy. May be specified as [name=value] to give a different value per mnemonic. The limit is based on worker keys, which are differentiated based on mnemonic, but also on startup flags and environment, so there can in some cases be more workers per mnemonic than this flag specifies. Takes an integer, or a keyword ("auto", "HOST_CPUS", "HOST_RAM"), optionally followed by an operation ([-|*]<float>) eg. "auto", "HOST_CPUS*.5". 'auto' calculates a reasonable default based on machine capacity. "=value" sets a default for unspecified mnemonics.

--worker_max_instances

Allows multiple
True
Documentation category
execution_strategy
Option effect tags
executionhost_machine_resource_optimizations

--worker_max_multiplex_instances 🔗

Use with: build

How many WorkRequests a multiplex worker process may receive in parallel if you use the 'worker' strategy with --worker_multiplex. May be specified as [name=value] to give a different value per mnemonic. The limit is based on worker keys, which are differentiated based on mnemonic, but also on startup flags and environment, so there can in some cases be more workers per mnemonic than this flag specifies. Takes an integer, or a keyword ("auto", "HOST_CPUS", "HOST_RAM"), optionally followed by an operation ([-|*]<float>) eg. "auto", "HOST_CPUS*.5". 'auto' calculates a reasonable default based on machine capacity. "=value" sets a default for unspecified mnemonics.

--worker_max_multiplex_instances

Old name
--experimental_worker_max_multiplex_instances
Warn old name
True
Allows multiple
True
Documentation category
execution_strategy
Option effect tags
executionhost_machine_resource_optimizations

--worker_multiplex 🔗

Use with: build

If enabled, workers will use multiplexing if they support it.

--[no]worker_multiplex

Old name
--[no]experimental_worker_multiplex
Warn old name
True
Allows multiple
False
Documentation category
execution_strategy
Option effect tags
executionhost_machine_resource_optimizations

--worker_quit_after_build 🔗

Use with: build

If enabled, all workers quit after a build is done.

--[no]worker_quit_after_build

Allows multiple
False
Documentation category
execution_strategy
Option effect tags
executionhost_machine_resource_optimizations

--worker_sandboxing 🔗

Use with: build

If enabled, workers will be executed in a sandboxed environment.

--[no]worker_sandboxing

Allows multiple
False
Documentation category
execution_strategy
Option effect tags
execution

--worker_verbose 🔗

Use with: build

If enabled, prints verbose messages when workers are started, shutdown, ...

--[no]worker_verbose

Allows multiple
False
Documentation category
execution_strategy
Option effect tags
unknown

--workspace_rc 🔗

Use with: startup

Whether or not to look for the workspace bazelrc file at $workspace/.bazelrc

--[no]workspace_rc

Allows multiple
False
Documentation category
bazel_client_options
Option effect tags
changes_inputs

--workspace_status_command 🔗

Use with: build

A command invoked at the beginning of the build to provide status information about the workspace in the form of key/value pairs. See the User's Manual for the full specification. Also see tools/buildstamp/get_workspace_status for an example.

--workspace_status_command=<path>

Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown

--write_command_log 🔗

Use with: startup

Whether or not to write the command.log file

--[no]write_command_log

Allows multiple
False
Documentation category
undocumented
Option effect tags
affects_outputsloses_incremental_state

--xbinary_fdo 🔗

Use with: configuration

Use XbinaryFDO profile information to optimize compilation. Specify the name of default cross binary profile. When the option is used together with --fdo_instrument/--fdo_optimize/--fdo_profile, those options will always prevail as if xbinary_fdo is never specified.

--xbinary_fdo

Allows multiple
False
Documentation category
output_parameters
Option effect tags
affects_outputs

--xcode_version 🔗

Use with: configuration

If specified, uses Xcode of the given version for relevant build actions. If unspecified, uses the executor default version of Xcode.

--xcode_version

Allows multiple
False
Documentation category
toolchain
Option effect tags
loses_incremental_state

--xcode_version_config 🔗

Use with: configuration

The label of the xcode_config rule to be used for selecting the Xcode version in the build configuration.

--xcode_version_config

Allows multiple
False
Documentation category
toolchain
Option effect tags
loses_incremental_stateloading_and_analysis

--xml:default_values 🔗

Use with: query

If true, rule attributes whose value is not explicitly specified in the BUILD file are printed; otherwise they are omitted.

--[no]xml:default_values

Allows multiple
False
Documentation category
query
Option effect tags
terminal_output

--xml:line_numbers 🔗

Use with: query

If true, XML output contains line numbers. Disabling this option may make diffs easier to read. This option is only applicable to --output=xml.

--[no]xml:line_numbers

Allows multiple
False
Documentation category
query
Option effect tags
terminal_output

--zip_undeclared_test_outputs 🔗

Use with: configuration

If true, undeclared test outputs will be archived in a zip file.

--[no]zip_undeclared_test_outputs

Allows multiple
False
Documentation category
testing
Option effect tags
test_runner

Unformatted

{
    "optionEffectTags": [
        {
            "description": "This option has unknown, or undocumented, effect.",
            "name": "unknown"
        },
        {
            "description": "This option has literally no effect.",
            "name": "no_op"
        },
        {
            "description": "Changing the value of this option can cause significant loss of incremental state, which slows builds. State could be lost due to a server restart or to invalidation of a large part of the dependency graph.",
            "name": "loses_incremental_state"
        },
        {
            "description": "This option actively changes the inputs that bazel considers for the build, such as filesystem restrictions, repository versions, or other options.",
            "name": "changes_inputs"
        },
        {
            "description": "This option affects bazel's outputs. This tag is intentionally broad, can include transitive affects, and does not specify the type of output it affects.",
            "name": "affects_outputs"
        },
        {
            "description": "This option affects the semantics of BUILD or .bzl files.",
            "name": "build_file_semantics"
        },
        {
            "description": "This option affects settings of bazel-internal machinery. This tag does not, on its own, mean that build artifacts are affected.",
            "name": "bazel_internal_configuration"
        },
        {
            "description": "This option affects the loading and analysis of dependencies, and the building of the dependency graph.",
            "name": "loading_and_analysis"
        },
        {
            "description": "This option affects the execution phase, such as sandboxing or remote execution related options.",
            "name": "execution"
        },
        {
            "description": "This option triggers an optimization that may be machine specific and is not guaranteed to work on all machines. The optimization could include a tradeoff with other aspects of performance, such as memory or cpu cost.",
            "name": "host_machine_resource_optimizations"
        },
        {
            "description": "This option changes how eagerly bazel will exit from a failure, where a choice between continuing despite the failure and ending the invocation exists.",
            "name": "eagerness_to_exit"
        },
        {
            "description": "This option is used to monitor bazel's behavior and performance.",
            "name": "bazel_monitoring"
        },
        {
            "description": "This option affects bazel's terminal output.",
            "name": "terminal_output"
        },
        {
            "description": "This option changes the command line arguments of one or more build actions.",
            "name": "action_command_lines"
        },
        {
            "description": "This option changes the testrunner environment of the build.",
            "name": "test_runner"
        }
    ],
    "optionMetadataTags": [
        {
            "description": "This option triggers an experimental feature with no guarantees of functionality.",
            "name": "experimental"
        },
        {
            "description": "This option triggers a breaking change. Use this option to test your migration readiness or get early access to the new feature",
            "name": "incompatible_change"
        },
        {
            "description": "This option is deprecated. It might be that the feature it affects is deprecated, or that another method of supplying the information is preferred.",
            "name": "deprecated"
        },
        {
            "description": "This option should not be used by a user, and should not be logged.",
            "name": "hidden"
        },
        {
            "description": "This option isn't even a option, and should not be logged.",
            "name": "internal"
        }
    ]
}