CLI Reference for Bazel v6.2.0

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

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

modquery

Queries the Bzlmod external dependency graph

bazel modquery

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

--allow_analysis_failures 🔗

Use with: configuration

If true, an analysis failure of a rule target results in the target's propagation of an instance of AnalysisFailureInfo containing the error description, instead of resulting in a build failure.

--[no]allow_analysis_failures

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

--allow_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
Deprecation warning
Deprecated, use --strategy_regexp instead.
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.

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

--[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_include_proguard_location_references 🔗

Use with: configuration

When using aapt2 to generate proguard configurations, include location references. This will make the build nondeterministic.

--[no]android_include_proguard_location_references

Allows multiple
False
Documentation category
undocumented
Option effect tags
affects_outputs

--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
logging
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_bitcode 🔗

Use with: configuration

Specify the Apple bitcode mode for compile steps targeting device architectures. Values are of the form '[platform=]mode', where the platform (which must be 'ios', 'macos', 'tvos', or 'watchos') is optional. If provided, the bitcode mode is applied for that platform specifically; if omitted, it is applied for all platforms. The mode must be 'none', 'embedded_markers', or 'embedded'. This option may be provided multiple times.

--apple_bitcode

Allows multiple
True
Documentation category
output_parameters
Option effect tags
loses_incremental_state

--apple_compiler 🔗

Use with: configuration

The Apple target compiler. Useful for selecting variants of a toolchain (e.g. xcode-beta).

--apple_compiler

Allows multiple
False
Documentation category
toolchain
Option effect tags
affects_outputsloading_and_analysisloses_incremental_state

--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_enable_auto_dsym_dbg 🔗

Use with: configuration

Whether to force enable generating debug symbol(.dSYM) file(s) for dbg builds.

--[no]apple_enable_auto_dsym_dbg

Allows multiple
False
Documentation category
output_selection
Option effect tags
affects_outputsaction_command_lines

--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_grte_top 🔗

Use with: configuration

The Apple target grte_top.

--apple_grte_top

Allows multiple
False
Documentation category
toolchain
Option effect tags
changes_inputsloading_and_analysisloses_incremental_state

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

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

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_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.

--bes_upload_mode

Allows multiple
False
Documentation category
undocumented
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
Implicit requirements
--bes_upload_mode=wait_for_upload_complete
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_json_file 🔗

Use with: common

If non-empty, write a JSON serialisation of the build event protocol to that file.

--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_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_upload_max_threads 🔗

Use with: buildfetchquerysynctest

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 only manifests when possible.

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

--call_count_output_path 🔗

Use with: common

An absolute path to a pprof gz file. At the end of the command a call count file will be written.

--call_count_output_path

Allows multiple
False
Documentation category
undocumented
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
Option metadata tags
explicit_in_output_path

--cc_proto_library_header_suffixes 🔗

Use with: configuration

Sets the prefixes 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 prefixes 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: modquery

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
modquery
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: configuration

--[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: configuration

When enabled, redundant --defines will be removed early in the build. This avoids unnecessary loss of the analysis cache for certain types of equivalent builds.

--[no]collapse_duplicate_defines

Allows multiple
False
Documentation category
build_time_optimization
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
Option metadata tags
explicit_in_output_path

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

--compress_in_memory_genquery_results 🔗

Use with: configuration

If true, the in-memory representation of genquery results may be compressed as is necessary. Can save sufficient memory at the expense of more CPU usage.

--[no]compress_in_memory_genquery_results

Allows multiple
False
Documentation category
undocumented
Option effect tags
bazel_internal_configuration

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

Only sync repositories marked as 'configure' for system-configuration purpose.

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

--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
Option metadata tags
explicit_in_output_path

--crosstool_top 🔗

Use with: configuration

The label of the crosstool package to be used for compiling C++ code.

--crosstool_top

Allows multiple
False
Documentation category
toolchain
Option effect tags
loading_and_analysischanges_inputsaffects_outputs

--cs_fdo_absolute_path 🔗

Use with: configuration

Use CSFDO profile information to optimize compilation. Specify the absolute path name of the zip file containing the profile file, a raw or an indexed LLVM profile file.

--cs_fdo_absolute_path

Allows multiple
False
Documentation category
output_parameters
Option effect tags
affects_outputs

--cs_fdo_instrument 🔗

Use with: configuration

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

--cs_fdo_instrument

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

--cs_fdo_profile 🔗

Use with: configuration

The cs_fdo_profile representing the context sensitive profile to be used for optimization.

--cs_fdo_profile

Allows multiple
False
Documentation category
output_parameters
Option effect tags
affects_outputs

--curses 🔗

Use with: common

Use terminal cursor controls to minimize scrolling output.

--curses

Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown

--custom_malloc 🔗

Use with: configuration

Specifies a custom malloc implementation. This setting overrides malloc attributes in build rules.

--custom_malloc

Allows multiple
False
Documentation category
toolchain
Option effect tags
changes_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: modquery

Points out dependency cycles inside the displayed tree, which are normally ignored by default.

--[no]cycles

Allows multiple
False
Documentation category
modquery
Option effect tags
execution

--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_print_action_contexts 🔗

Use with: build

Print the contents of the SpawnActionContext and ContextProviders maps.

--[no]debug_print_action_contexts

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown

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

--deduplicate_depsets 🔗

Use with: aquery

De-duplicate non-leaf children of a dep_set_of_files in the final proto/textproto/json output. This does not deduplicate depsets that don't share an immediate parent. This does not affect the final effective list of input artifacts of the actions.

--[no]deduplicate_depsets

Allows multiple
False
Documentation category
query
Option effect tags
terminal_output

--default_visibility 🔗

Use with: buildcanonicalize-flagsfetchmodqueryquerysync

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

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.

--define

Allows multiple
True
Documentation category
output_parameters
Option effect tags
changes_inputsaffects_outputs

--deleted_packages 🔗

Use with: buildcanonicalize-flagsfetchmodqueryquerysync

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
False
Documentation category
uncategorized
Option effect tags
unknown

--depth 🔗

Use with: modquery

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
modquery
Option effect tags
execution

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

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

--distinct_host_configuration 🔗

Use with: common

No-op.

--[no]distinct_host_configuration

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

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

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

--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. Passing 'local' as the mnemonic sets the default for unspecified mnemonics. 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 to use for the given mnemonic. Passing 'remote' as the mnemonic sets the default for unspecified mnemonics. Takes [mnemonic=]remote_strategy[,remote_strategy,...]

--dynamic_remote_strategy

Allows multiple
True
Documentation category
execution_strategy
Option effect tags
executionhost_machine_resource_optimizations

--dynamic_worker_strategy 🔗

Use with: build

Deprecated no-op. Please use --dynamic_local_strategy=worker,....

--dynamic_worker_strategy

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

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

--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 delimited Spawn protos, according to src/main/protobuf/spawn.proto. The log is first written unordered and is then, at the end of the invocation, sorted in a stable order (can be CPU and memory intensive). Related flags: --execution_log_json_file (ordered text json format), --experimental_execution_log_file (unordered binary protobuf format), --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 json representation of the delimited Spawn protos, according to src/main/protobuf/spawn.proto. The log is first written unordered and is then, at the end of the invocation, sorted in a stable order (can be CPU and memory intensive). Related flags: Related flags: --execution_log_binary_file (ordered binary protobuf format), --experimental_execution_log_file (unordered binary protobuf format), --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. Set to false to improve memory performance, at the cost of producing the log in nondeterministic order.

--[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_cache_store_output_metadata 🔗

Use with: build

Whether to store output metadata in the action cache

--[no]experimental_action_cache_store_output_metadata

Allows multiple
False
Documentation category
undocumented
Option effect tags
bazel_internal_configurationhost_machine_resource_optimizations

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

Flag to help transition from allowing to disallowing srcs-less android_library rules with deps. The depot needs to be cleaned up to roll this out by default.

--[no]experimental_allow_android_library_deps_without_srcs

Allows multiple
False
Documentation category
input_strictness
Option effect tags
eagerness_to_exitloading_and_analysis

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_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]experimental_allow_tags_propagation

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

--experimental_allow_top_level_aspects_parameters 🔗

Use with: common

No-op

--[no]experimental_allow_top_level_aspects_parameters

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

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

--[no]experimental_allow_unresolved_symlinks

Allows multiple
False
Documentation category
undocumented
Option effect tags
loses_incremental_stateloading_and_analysis

--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_analysis_test_call 🔗

Use with: common

If set to true, analysis_test native call is available.

--[no]experimental_analysis_test_call

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

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

--[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_local_test_binary_resources 🔗

Use with: configuration

If true, provide Robolectric with binary resources instead of raw resources for android_local_test. This should only be used by Robolectric team members for testing purposes.

--[no]experimental_android_local_test_binary_resources

Allows multiple
False
Documentation category
undocumented
Option effect tags
affects_outputs

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

--experimental_apple_mandatory_minimum_version 🔗

Use with: configuration

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

--[no]experimental_apple_mandatory_minimum_version

Allows multiple
False
Documentation category
undocumented
Option effect tags
no_op

--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_async_execution 🔗

Use with: build

If set to true, Bazel is allowed to run aynchronously, i.e., without reserving a local thread. This only has an effect if the action implementation and the lower-level strategy support it. This setting effectively circumvents the implicit limit of number of concurrently running actions otherwise imposed by the --jobs flag. Use with caution.

--[no]experimental_async_execution

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

--experimental_availability_info_exempt 🔗

Use with: build

A comma-separated list of mnemonics that are not required to have Xcode-related execution info if --experimental_require_availability_info=true. No-op if --experimental_require_availability_info=false.

--experimental_availability_info_exempt

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown

--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_setting_api 🔗

Use with: common

If set to true, allows access to value of build setting rules via ctx.build_setting_value.

--[no]experimental_build_setting_api

Allows multiple
False
Documentation category
undocumented
Option effect tags
build_file_semantics

--experimental_build_transitive_python_runfiles 🔗

Use with: configuration

Build the runfiles trees of py_binary targets that appear in the transitive data runfiles of another binary.

--[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
loading_and_analysisaffects_outputs
Option metadata tags
incompatible_change

--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_shared_library_debug 🔗

Use with: configuration

If enabled, will create debug files associated with cc_shared_library.

--[no]experimental_cc_shared_library_debug

Allows multiple
False
Documentation category
undocumented
Option effect tags
loading_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-flagsfetchmodqueryquerysync

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_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
undocumented
Option effect tags
affects_outputsbazel_monitoring

--experimental_collect_local_action_metrics 🔗

Use with: build

When enabled, execution statistics (such as user and system time) are recorded for locally executed actions which don't use sandboxing

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

When enabled, execution statistics (such as user and system time) are recorded for locally executed actions which use sandboxing

--[no]experimental_collect_local_sandbox_action_metrics

Allows multiple
False
Documentation category
logging
Option effect tags
execution

--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
undocumented
Option effect tags
affects_outputsbazel_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
undocumented
Option effect tags
affects_outputsbazel_monitoring

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_argv_ignore_param_file 🔗

Use with: configuration

If enabled, CppCompileAction action.argv returns the complete list of argv even if compiler_param_file is enabled.

--[no]experimental_cpp_compile_argv_ignore_param_file

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

--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_credential_helper 🔗

Use with: buildcommonfetchquerysynctest

Configures Credential Helpers to use for retrieving credentials for the provided scope (domain). Credentials from Credential Helpers take precedence over credentials from <code>--google_default_credentials</code>, `--google_credentials`, or <code>.netrc</code>. See https://github.com/bazelbuild/proposals/blob/main/designs/2022-06-07-bazel-credential-helpers.md for details.

--experimental_credential_helper

Allows multiple
True
Documentation category
uncategorized
Option effect tags
unknown

--experimental_credential_helper_cache_duration 🔗

Use with: buildcommonfetchquerysynctest

Configures the duration for which credentials from Credential Helpers 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.

--experimental_credential_helper_cache_duration

Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown

--experimental_credential_helper_timeout 🔗

Use with: buildcommonfetchquerysynctest

Configures the timeout for the Credential Helper. Credential Helpers failing to respond within this timeout will fail the invocation.

--experimental_credential_helper_timeout

Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown

--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_execution_cpu_limited 🔗

Use with: build

Deprecated no-op. Use --experimental_dynamic_local_load_factor instead, with the values 0 for false and 1 for true, or with a value in between.

--[no]experimental_dynamic_execution_cpu_limited

Allows multiple
False
Documentation category
undocumented
Option effect tags
executionhost_machine_resource_optimizations

--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_skip_first_build 🔗

Use with: build

Deprecated no-op. Use --experimental_dynamic_local_load_factor instead.

--[no]experimental_dynamic_skip_first_build

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown

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

--[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_jspecify 🔗

Use with: configuration

Enable experimental jspecify integration.

--[no]experimental_enable_jspecify

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown

--experimental_enable_objc_cc_deps 🔗

Use with: configuration

Allows objc_* rules to depend on cc_library and causes any objc dependencies to be built with --cpu set to "ios_<--ios_cpu>" for any values in --ios_multi_cpu.

--[no]experimental_enable_objc_cc_deps

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

--experimental_enable_target_export_check 🔗

Use with: configuration

If enabled, cc_shared_library will export targets which is allowed by its `permissions` attribute.

--[no]experimental_enable_target_export_check

Allows multiple
False
Documentation category
undocumented
Option effect tags
loading_and_analysis
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_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.

--experimental_execution_graph_log

Allows multiple
False
Documentation category
undocumented
Option effect tags
affects_outputs

--experimental_execution_graph_log_cached 🔗

Use with: build

Subscribe to CachedActionEvent in ExecutionGraphModule.

--[no]experimental_execution_graph_log_cached

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_missed 🔗

Use with: build

Subscribe to ActionCompletionEvent in ExecutionGraphModule.

--[no]experimental_execution_graph_log_missed

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown

--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_file 🔗

Use with: build

Log the executed spawns into this file as delimited Spawn protos, according to src/main/protobuf/spawn.proto. This file is written in order of the execution of the Spawns. Related flags: --execution_log_binary_file (ordered binary protobuf format), --execution_log_json_file (ordered text json format), --subcommands (for displaying subcommands in terminal output).

--experimental_execution_log_file

Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown

--experimental_execution_log_spawn_metrics 🔗

Use with: build

Include spawn metrics in the executed spawns log.

--[no]experimental_execution_log_spawn_metrics

Allows multiple
False
Documentation category
uncategorized
Option effect tags
unknown

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

Whether to use graphless query and disable output ordering.

--[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_get_fixed_configured_action_env 🔗

Use with: common

If enabled, action.env will also return fixed environment variables specified through features configuration.

--[no]experimental_get_fixed_configured_action_env

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

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

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_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_includes_attribute_subpackage_traversal 🔗

Use with: configuration

If a cc target has loose headers checking, disabled layering check and an includes attribute set, it is allowed to include anything under its folder, even across subpackage boundaries.

--[no]experimental_includes_attribute_subpackage_traversal

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

--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_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_proto_add_allowed_public_imports 🔗

Use with: configuration

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_proto_library_default_has_services 🔗

Use with: common

The default value of java_proto_library.has_services.

--[no]experimental_java_proto_library_default_has_services

Allows multiple
False
Documentation category
undocumented
Option effect tags
build_file_semantics

--experimental_keep_config_nodes_on_analysis_discard 🔗

Use with: common

No-op

--[no]experimental_keep_config_nodes_on_analysis_discard

Allows multiple
False
Documentation category
undocumented
Option effect tags
no_op

--experimental_lazy_template_expansion 🔗

Use with: common

If set to true, ctx.actions.expand_template() accepts a TemplateDict parameter for deferred evaluation of substitution values.

--[no]experimental_lazy_template_expansion

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

--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
True
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 does 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_memory_estimate 🔗

Use with: build

No-op.

--[no]experimental_local_memory_estimate

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

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

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_multi_cpu 🔗

Use with: build

Deprecated. No-op.

--experimental_multi_cpu

Allows multiple
True
Deprecation warning
This flag is a no-op and will be deleted in a future release.
Documentation category
output_parameters
Option effect tags
affects_outputs
Option metadata tags
experimental

--experimental_multi_threaded_digest 🔗

Use with: build

No-op

--[no]experimental_multi_threaded_digest

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown

--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_more_eagerly_threshold 🔗

Use with: common

If this flag is set to a value less than 100, Bazel will OOM if, after two full GC's, more than this percentage of the (old gen) heap is still occupied.

--experimental_oom_more_eagerly_threshold

Allows multiple
False
Documentation category
execution_strategy
Option effect tags
host_machine_resource_optimizations

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

--experimental_output_paths

Allows multiple
False
Documentation category
undocumented
Option effect tags
loses_incremental_statebazel_internal_configurationaffects_outputsexecution

--experimental_parse_headers_skipped_if_corresponding_srcs_found 🔗

Use with: configuration

If enabled, the parse_headers feature does not create a separate header compile action if a source with the same basename is found in the same target.

--[no]experimental_parse_headers_skipped_if_corresponding_srcs_found

Allows multiple
False
Documentation category
build_time_optimization
Option effect tags
loading_and_analysisaffects_outputs

--experimental_persistent_javac 🔗

Use with: build

Enable the experimental persistent Java compiler.

--experimental_persistent_javac

Allows multiple
False
Documentation category
execution_strategy
Expands to
--strategy=Javac=worker
--strategy=JavaIjar=local
--strategy=JavaDeployJar=local
--strategy=JavaSourceJar=local
--strategy=Turbine=local
Option effect tags
executionhost_machine_resource_optimizations

--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, the target platform is used in the output directory name instead of the CPU.

--[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_prioritize_local_actions 🔗

Use with: build

If set, actions that can only run locally are given first chance at acquiring resources, dynamically run workers get second chance, and dynamically-run standalone actions come last.

--[no]experimental_prioritize_local_actions

Allows multiple
False
Documentation category
uncategorized
Option effect tags
execution

--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
affects_outputsbazel_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
affects_outputsbazel_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
affects_outputsbazel_monitoring

--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_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_build_event_upload 🔗

Use with: buildfetchquerysynctest

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 'all'.

--experimental_remote_build_event_upload

Allows multiple
False
Documentation category
remote
Option effect tags
unknown

--experimental_remote_cache_async 🔗

Use with: buildfetchquerysynctest

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_compression 🔗

Use with: buildfetchquerysynctest

If enabled, compress/decompress cache blobs with zstd.

--[no]experimental_remote_cache_compression

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.

--experimental_remote_cache_eviction_retries

Allows multiple
False
Documentation category
remote
Option effect tags
execution

--experimental_remote_capture_corrupted_outputs 🔗

Use with: buildfetchquerysynctest

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

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_download_regex 🔗

Use with: buildfetchquerysynctest

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)

--experimental_remote_download_regex

Allows multiple
True
Documentation category
undocumented
Option effect tags
affects_outputs

--experimental_remote_downloader 🔗

Use with: buildfetchquerysynctest

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

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

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_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: buildfetchquerysynctest

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

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

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_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_replay_action_out_err 🔗

Use with: build

If this flag is set, replay action out/err on incremental builds.

--[no]experimental_replay_action_out_err

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

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

If true, use a string derived from the URLs of repository downloads as the canonical_id if not specified. This causes a change in the URLs to result in a redownload even if the cache contains a download with the same hash. This can be used to verify that URL changes don't result in broken repositories being masked by the cache.

--[no]experimental_repository_cache_urls_as_default_canonical_id

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

--experimental_repository_disable_download 🔗

Use with: common

If set, downloading external repositories is not allowed.

--[no]experimental_repository_disable_download

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

--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_hash_file 🔗

Use with: common

If non-empty, specifies a file containing a resolved value, against which the repository directory hashes should be verified

--experimental_repository_hash_file

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

If true, fail the build if there are actions that set requires-darwin but do not haveXcode availability-related execution requirements set.

--[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_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_validations 🔗

Use with: build

Use --run_validations instead.

--[no]experimental_run_validations

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

Use with: build

If true, maps the targets of symbolic links specified as action inputs into the sandbox. This feature exists purely to workaround buggy rules that do not do this on their own and should be removed once all such rules are fixed.

--[no]experimental_sandboxfs_map_symlink_targets

Allows multiple
False
Documentation category
input_strictness
Option effect tags
host_machine_resource_optimizationsexecution

--experimental_sandboxfs_path 🔗

Use with: build

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

--experimental_sandboxfs_path

Allows multiple
False
Documentation category
execution_strategy
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_shortened_obj_file_path 🔗

Use with: build

This option is deprecated and has no effect.

--[no]experimental_shortened_obj_file_path

Allows multiple
False
Documentation category
undocumented
Option effect tags
execution

--experimental_show_artifacts 🔗

Use with: build

Output a list of all top level artifacts produced by this build.Use output format suitable for tool consumption. This flag is temporary and intended to facilitate Android Studio integration. This output format will likely change in the future or disappear completely.

--[no]experimental_show_artifacts

Allows multiple
False
Documentation category
undocumented
Option effect tags
affects_outputs

--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_include_scanning 🔗

Use with: build

Deprecated, has no effect.

--[no]experimental_skyframe_include_scanning

Allows multiple
False
Deprecation warning
No longer active: is a no-op
Documentation category
undocumented
Option effect tags
bazel_internal_configurationexecutionhost_machine_resource_optimizations

--experimental_skyframe_native_filesets 🔗

Use with: configuration

--[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_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_ui 🔗

Use with: common

Displays both analysis and execution phase progress when both are running concurrently.

--[no]experimental_skymeld_ui

Allows multiple
False
Documentation category
uncategorized
Option effect tags
terminal_output

--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_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: build

If this flag is set, use a fork join pool in the abstract queue visitor.

--[no]experimental_use_fork_join_pool

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

--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_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_sandboxfs 🔗

Use with: build

Use sandboxfs to create the actions' execroot directories instead of building a symlink tree. If "yes", the binary provided by --experimental_sandboxfs_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_sandboxfs

Allows multiple
False
Documentation category
execution_strategy
Option effect tags
host_machine_resource_optimizationsexecution

--experimental_use_sh_binary_stub_script 🔗

Use with: configuration

If enabled, use a stub script for sh_binary targets.

--[no]experimental_use_sh_binary_stub_script

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

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

--experimental_verify_repository_rules 🔗

Use with: common

If list of repository rules for which the hash of the output directory should be verified, provided a file is specified by --experimental_repository_hash_file.

--experimental_verify_repository_rules

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

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

--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_as_resource 🔗

Use with: build

If enabled, workers are acquired as resources from ResourceManager.

--[no]experimental_worker_as_resource

Allows multiple
False
Documentation category
execution_strategy
Option effect tags
executionhost_machine_resource_optimizations

--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_multiplex 🔗

Use with: build

If enabled, workers that support the experimental multiplexing feature will use that feature.

--[no]experimental_worker_multiplex

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

--extra 🔗

Use with: modquery

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]extra

Allows multiple
False
Documentation category
modquery
Option effect tags
execution

--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().

--extra_execution_platforms

Allows multiple
True
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-flagsfetchmodqueryquerysync

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_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: modquery

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

--from

Allows multiple
False
Documentation category
modquery
Option effect tags
execution

--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
affects_outputsbazel_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: buildcommonfetchquerysynctest

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

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

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

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

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 OOMs due to --experimental_oom_more_eagerly_threshold). The dump will be written to <output_base>/<invocation_id>.heapdump.hprof. This option effectively replaces -XX:+HeapDumpOnOutOfMemoryError, which has no effect because OOMs are caught and redirected to Runtime#halt.

--[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
affects_outputsterminal_output

--high_priority_workers 🔗

Use with: build

Mnemonics of workers to run with high priority. When high priority workers are running all other workers are throttled.

--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 host or 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

The C++ compiler to use for host compilation. It is ignored if --host_crosstool_top is not set.

--host_compiler

Allows multiple
False
Documentation category
toolchain
Option effect tags
loading_and_analysisexecution

--host_conlyopt 🔗

Use with: configuration

Additional option to pass to gcc when compiling C source files for host tools.

--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 gcc for host tools.

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

By default, the --crosstool_top and --compiler options are also used for the host configuration. If this flag is provided, Bazel uses the default libc and compiler for the given crosstool_top.

--host_crosstool_top

Allows multiple
False
Documentation category
toolchain
Option effect tags
loading_and_analysischanges_inputsaffects_outputs

--host_cxxopt 🔗

Use with: configuration

Additional options to pass to gcc for host tools.

--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 host 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 host 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 gcc when linking host tools.

--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 host or 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

--host_swiftcopt 🔗

Use with: configuration

Additional options to pass to swiftc for host tools.

--host_swiftcopt

Allows multiple
True
Documentation category
output_parameters
Option effect tags
action_command_linesaffects_outputs

--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
uncategorized
Option effect tags
unknown

--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_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 and SourceSymlinkManifest 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_unused 🔗

Use with: modquery

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
modquery
Option effect tags
execution

--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_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: configuration

If true, the host platform will be inherited from @local_config_platform//:host, instead of being based on the --cpu (and --host_cpu) flags.

--[no]incompatible_auto_configure_host_platform

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

--incompatible_avoid_conflict_dlls 🔗

Use with: configuration

If enabled, all C++ dynamic linked libraries (DLLs) generated by cc_library on Windows will be renamed to name_{hash}.dll where hash is calculated based on the RepositoryName and the DLL's package path. This option is useful when you have one package which depends on severals cc_library with the same name (e.g //foo/bar1:utils and //foo/bar2:utils).

--[no]incompatible_avoid_conflict_dlls

Allows multiple
False
Documentation category
output_parameters
Option effect tags
loading_and_analysisaffects_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_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_config_setting_private_default_visibility 🔗

Use with: buildcanonicalize-flagsfetchmodqueryquerysync

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

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_cc_configuration_make_variables 🔗

Use with: build

Deprecated no-op.

--[no]incompatible_disable_cc_configuration_make_variables

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

--incompatible_disable_cc_toolchain_label_from_crosstool_proto 🔗

Use with: build

Deprecated no-op.

--[no]incompatible_disable_cc_toolchain_label_from_crosstool_proto

Allows multiple
False
Documentation category
undocumented
Option effect tags
loading_and_analysiseagerness_to_exit
Option metadata tags
deprecatedincompatible_change

--incompatible_disable_crosstool_file 🔗

Use with: build

Deprecated no-op.

--[no]incompatible_disable_crosstool_file

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

--incompatible_disable_depset_in_cc_user_flags 🔗

Use with: build

Deprecated no-op.

--[no]incompatible_disable_depset_in_cc_user_flags

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

--incompatible_disable_expand_if_all_available_in_flag_set 🔗

Use with: configuration

If true, Bazel will not allow specifying expand_if_all_available in flag_sets(see https://github.com/bazelbuild/bazel/issues/7008 for migration instructions).

--[no]incompatible_disable_expand_if_all_available_in_flag_set

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

--incompatible_disable_legacy_cc_provider 🔗

Use with: configuration

If true, the legacy provider accessible by 'dep.cc.' is removed. See #7036.

--[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_cpp_toolchain_skylark_api 🔗

Use with: build

Obsolete, no effect.

--[no]incompatible_disable_legacy_cpp_toolchain_skylark_api

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

--incompatible_disable_legacy_crosstool_fields 🔗

Use with: build

Deprecated no-op.

--[no]incompatible_disable_legacy_crosstool_fields

Old name
--[no]experimental_disable_legacy_crosstool_fields
Warn old name
True
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_managed_directories 🔗

Use with: common

No-op

--[no]incompatible_disable_managed_directories

Allows multiple
False
Documentation category
undocumented
Option effect tags
no_op

--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_runtimes_filegroups 🔗

Use with: build

Deprecated no-op.

--[no]incompatible_disable_runtimes_filegroups

Allows multiple
False
Documentation category
toolchain
Option effect tags
action_command_linesloading_and_analysis
Option metadata tags
deprecatedincompatible_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_sysroot_from_configuration 🔗

Use with: build

Deprecated no-op.

--[no]incompatible_disable_sysroot_from_configuration

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

--incompatible_disable_target_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_provider_fields

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

--incompatible_disable_third_party_license_checking 🔗

Use with: common

No-op

--[no]incompatible_disable_third_party_license_checking

Allows multiple
False
Documentation category
undocumented
Option effect tags
no_op

--incompatible_disable_tools_defaults_package 🔗

Use with: build

Deprecated no-op.

--[no]incompatible_disable_tools_defaults_package

Allows multiple
False
Documentation category
undocumented
Option effect tags
affects_outputsloading_and_analysis
Option metadata tags
deprecatedincompatible_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_javainfo 🔗

Use with: common

Deprecated. No-op.

--[no]incompatible_disallow_legacy_javainfo

Allows multiple
False
Documentation category
starlark_semantics
Option effect tags
build_file_semantics
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_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

If set to true, `ctx.actions.symlink` will disallow symlinking a file into a directory.

--[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_display_source_file_location 🔗

Use with: aquerycqueryquery

True by default, displays the target of the source file. If true, displays the location of line 1 of source files in location outputs. This flag only exists for migration purposes.

--[no]incompatible_display_source_file_location

Allows multiple
False
Documentation category
query
Option effect tags
terminal_output
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_emit_static_libgcc 🔗

Use with: build

Deprecated no-op.

--[no]incompatible_dont_emit_static_libgcc

Old name
--[no]experimental_dont_emit_static_libgcc
Warn old name
True
Allows multiple
False
Documentation category
toolchain
Option effect tags
action_command_linesloading_and_analysis
Option metadata tags
deprecatedincompatible_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

If true, cc rules use toolchain resolution to find the cc_toolchain.

--[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_legacy_cpp_toolchain_skylark_api 🔗

Use with: build

Obsolete, no effect.

--[no]incompatible_enable_legacy_cpp_toolchain_skylark_api

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

--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_enforce_config_setting_visibility 🔗

Use with: buildcanonicalize-flagsfetchmodqueryquerysync

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_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_force_strict_header_check_from_starlark 🔗

Use with: configuration

If enabled, set strict header checking in the Starlark API

--[no]incompatible_force_strict_header_check_from_starlark

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

--incompatible_generated_protos_in_virtual_imports 🔗

Use with: configuration

If set, generated .proto files are put into a virtual import directory. For more information, see https://github.com/bazelbuild/bazel/issues/9215

--[no]incompatible_generated_protos_in_virtual_imports

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

--incompatible_genquery_use_graphless_query 🔗

Use with: configuration

Use graphless query and disable output ordering for genquery.

--incompatible_genquery_use_graphless_query

Allows multiple
False
Documentation category
undocumented
Expands to
--experimental_genquery_use_graphless_query=auto
Option effect tags
bazel_internal_configurationaffects_outputsloading_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_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

Use with: build

Deprecated no-op.

--[no]incompatible_linkopts_in_user_link_flags

Allows multiple
False
Documentation category
toolchain
Option effect tags
action_command_linesloading_and_analysis
Option metadata tags
deprecatedincompatible_change

--incompatible_load_cc_rules_from_bzl 🔗

Use with: configuration

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

--[no]incompatible_load_cc_rules_from_bzl

Allows multiple
False
Documentation category
undocumented
Option effect tags
loading_and_analysis
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_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

If set to true, the API to create actions is only available on `ctx.actions`, not on `ctx`.

--[no]incompatible_new_actions_api

Allows multiple
False
Documentation category
starlark_semantics
Option effect tags
build_file_semantics
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_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

--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_provide_cc_toolchain_info_from_cc_toolchain_suite 🔗

Use with: build

Deprecated no-op.

--[no]incompatible_provide_cc_toolchain_info_from_cc_toolchain_suite

Allows multiple
False
Documentation category
undocumented
Option effect tags
loading_and_analysis
Option metadata tags
deprecatedincompatible_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_remote_build_event_upload_respect_no_cache 🔗

Use with: buildfetchquerysynctest

If set to true, outputs referenced by BEP are not uploaded to remote cache if the generating action cannot be cached remotely.

--[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 --experimental_remote_build_event_upload=minimal.
Documentation category
remote
Option effect tags
unknown

Use with: buildfetchquerysynctest

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

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

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

If set to true, --noremote_upload_local_results and --noremote_accept_cached will not apply to the disk cache. If a combined cache is used: --noremote_upload_local_results will cause results to be written to the disk cache, but not uploaded to the remote cache. --noremote_accept_cached will result in Bazel checking for results in the disk cache, but not in the remote cache. no-remote-exec actions can hit the disk cache. See #8216 for details.

--[no]incompatible_remote_results_ignore_disk

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

Use with: buildfetchquerysynctest

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

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_cpu_and_compiler_attributes_from_cc_toolchain 🔗

Use with: configuration

If true, Bazel will complain when cc_toolchain.cpu and cc_toolchain.compiler attributes are set (see https://github.com/bazelbuild/bazel/issues/7075 for migration instructions).

--[no]incompatible_remove_cpu_and_compiler_attributes_from_cc_toolchain

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

If set to true, `rule` can't be called with the `name` parameter.

--[no]incompatible_remove_rule_name_parameter

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

--incompatible_require_ctx_in_configure_features 🔗

Use with: configuration

If true, Bazel will require 'ctx' parameter in to cc_common.configure_features (see https://github.com/bazelbuild/bazel/issues/7793 for more information).

--[no]incompatible_require_ctx_in_configure_features

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

--incompatible_require_feature_configuration_for_pic 🔗

Use with: build

Deprecated no-op.

--[no]incompatible_require_feature_configuration_for_pic

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

--incompatible_require_javaplugininfo_in_javacommon 🔗

Use with: configuration

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 thansharing /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_strict_conflict_checks 🔗

Use with: configuration

Check for action prefix file path conflicts, regardless of action-specific overrides.

--[no]incompatible_strict_conflict_checks

Old name
--[no]experimental_strict_conflict_checks
Warn old name
True
Allows multiple
False
Documentation category
undocumented
Option effect tags
bazel_internal_configuration
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_platforms_repo_for_constraints 🔗

Use with: configuration

If true, constraint settings from @bazel_tools are removed.

--[no]incompatible_use_platforms_repo_for_constraints

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

If true, Bazel will also validate top level directory header inclusions (see https://github.com/bazelbuild/bazel/issues/10047 for more information).

--[no]incompatible_validate_top_level_header_inclusions

Allows multiple
False
Documentation category
input_strictness
Option effect tags
loading_and_analysis
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, rather than the rule usage.

--[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: configuration

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

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

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_spawn_scheduler 🔗

Use with: build

Was used to enable the old spawn scheduler. Now a no-op.

--[no]legacy_spawn_scheduler

Allows multiple
False
Deprecation warning
The --legacy_spawn_scheduler flag is a no-op and will be removed soon.
Documentation category
undocumented
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: buildfetchmodqueryquerysync

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
uncategorized
Option effect tags
unknown

--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
uncategorized
Option effect tags
unknown

--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
uncategorized
Option effect tags
unknown

--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
affects_outputsterminal_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
affects_outputsbazel_monitoring

--memory_profile_stable_heap_parameters 🔗

Use with: common

Tune memory profile's computation of stable heap at end of build. Should be two integers separated by a comma. First parameter is the number of GCs to perform. Second parameter is the number of seconds to wait between GCs.

--memory_profile_stable_heap_parameters

Allows multiple
False
Documentation category
logging
Option effect tags
bazel_monitoring

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

--noincompatible_genquery_use_graphless_query 🔗

Use with: configuration

Do not use graphless query for genquery.

--noincompatible_genquery_use_graphless_query

Allows multiple
False
Documentation category
undocumented
Expands to
--experimental_genquery_use_graphless_query=false
Option effect tags
bazel_internal_configurationaffects_outputsloading_and_analysis

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

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

The format in which the aquery results should be printed. Allowed values for aquery are: text, textproto, 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 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-flagsfetchmodqueryquerysync

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

--print_workspace_in_output_paths_if_needed 🔗

Use with: build

If enabled, when the current working directory is deeper than the workspace (for example, when running from <workspace>/foo instead of <workspace>), printed output paths include the absolute path to the workspace (for example, <workspace>/<symlink_prefix>-bin/foo/binary instead of <symlink_prefix>-bin/foo/binary).

--[no]print_workspace_in_output_paths_if_needed

Allows multiple
False
Documentation category
undocumented
Option effect tags
terminal_output

--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
affects_outputsbazel_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 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_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_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
Option metadata tags
explicit_in_output_path

--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
undocumented
Option effect tags
affects_outputsbazel_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: buildfetchquerysynctest

Whether to accept remotely cached action results.

--[no]remote_accept_cached

Allows multiple
False
Documentation category
remote
Option effect tags
unknown

--remote_bytestream_uri_prefix 🔗

Use with: buildfetchquerysynctest

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

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_header 🔗

Use with: buildfetchquerysynctest

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

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

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_minimal 🔗

Use with: buildfetchquerysynctest

Does not download any remote build outputs to the local machine. This flag is a shortcut for flags: --experimental_inmemory_jdeps_files, --experimental_inmemory_dotd_files, --experimental_action_cache_store_output_metadata and --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
--nobuild_runfile_links
--experimental_inmemory_jdeps_files
--experimental_inmemory_dotd_files
--experimental_action_cache_store_output_metadata
--remote_download_outputs=minimal
Option effect tags
affects_outputs

--remote_download_outputs 🔗

Use with: buildfetchquerysynctest

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

Use with: buildfetchquerysynctest

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

Only downloads remote outputs of top level targets to the local machine. This flag is a shortcut for flags: --experimental_inmemory_jdeps_files, --experimental_inmemory_dotd_files, --experimental_action_cache_store_output_metadata and --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
--experimental_inmemory_jdeps_files
--experimental_inmemory_dotd_files
--experimental_action_cache_store_output_metadata
--remote_download_outputs=toplevel
Option effect tags
affects_outputs

--remote_downloader_header 🔗

Use with: buildfetchquerysynctest

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Use with: clean

If true, all symlinks in the workspace with the prefix symlink_prefix will be deleted. Without this flag, only symlinks with the predefined suffixes are cleaned.

--[no]remove_all_convenience_symlinks

Allows multiple
False
Documentation category
output_selection
Option effect tags
affects_outputs

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

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

--resource_autosense 🔗

Use with: build

This flag has no effect, and is deprecated

--[no]resource_autosense

Allows multiple
False
Documentation category
undocumented
Option effect tags
unknown

--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. Ignored unless prerequisites for rewinding are met (no incrementality, no action cache).

--[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_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/rules/rules#validation_actions

--[no]run_validations

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 if sandboxfs is in use, the file system is left mounted); 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
unknown

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

--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
affects_outputsterminal_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-flagsfetchmodqueryquerysync

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.

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

--show_warnings 🔗

Use with: canonicalize-flags

Output parser warnings to standard error (e.g. for conflicting flag options).

--[no]show_warnings

Allows multiple
False
Documentation category
output_selection
Option effect tags
affects_outputsterminal_output

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

--skyframe 🔗

Use with: dump

Dump Skyframe graph: 'off', 'summary', 'count', 'deps', or 'rdeps'.

--skyframe

Allows multiple
False
Documentation category
output_selection
Option effect tags
bazel_monitoring

--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
affects_outputsbazel_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 first 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. It does not work when check_fileset_dependencies_recursively is disabled.

--[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: configuration

The label of a platform rule that should be used if no target platform is set and no platform mapping matches the current set of flags.

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

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

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

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

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 'host configuration' or 'execution' targets will not be included in the dependency graph over which the query operates. A 'host 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 a host or 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 host configuration, only host 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

--toolchain_resolution_override 🔗

Use with: configuration

Override toolchain resolution for a toolchain type with a specific toolchain. Example: --toolchain_resolution_override=@io_bazel_rules_go//:toolchain=@io_bazel_rules_go//:linux-arm64-toolchain

--toolchain_resolution_override

Allows multiple
True
Deprecation warning
toolchain_resolution_override is now a no-op and will be removed in an upcoming release
Documentation category
undocumented
Option effect tags
affects_outputschanges_inputsloading_and_analysis

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

--tvos_simulator_device 🔗

Use with: configuration

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

--tvos_simulator_device

Allows multiple
False
Documentation category
testing
Option effect tags
test_runner

--tvos_simulator_version 🔗

Use with: configuration

The version of tvOS to run on the simulator when running or testing.

--tvos_simulator_version

Allows multiple
False
Documentation category
testing
Option effect tags
test_runner

--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_singlejar_apkbuilder 🔗

Use with: configuration

This option is a deprecated. It is now a no-op and will be removed soon.

--[no]use_singlejar_apkbuilder

Allows multiple
False
Documentation category
build_time_optimization
Option effect tags
loading_and_analysis

Use with: build

If enabled, the symlinks are based on the configurations of the top-level targets rather than the top-level target configuration. If this would be ambiguous, the symlinks will be deleted to avoid confusion.

--[no]use_top_level_targets_for_symlinks

Allows multiple
False
Documentation category
undocumented
Option effect tags
affects_outputs

--use_workers_with_dexbuilder 🔗

Use with: build

This option is deprecated and has no effect.

--[no]use_workers_with_dexbuilder

Allows multiple
False
Documentation category
undocumented
Option effect tags
execution

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

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

--watchos_simulator_device 🔗

Use with: configuration

The device to simulate when running an watchOS application in the simulator, e.g. 'Apple Watch - 38mm'. You can get a list of devices by running 'xcrun simctl list devicetypes' on the machine the simulator will be run on.

--watchos_simulator_device

Allows multiple
False
Documentation category
testing
Option effect tags
test_runner

--watchos_simulator_version 🔗

Use with: configuration

The version of watchOS to run on the simulator when running or testing.

--watchos_simulator_version

Allows multiple
False
Documentation category
testing
Option effect tags
test_runner

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 a worker process (like the persistent Java compiler) may be launched if you use the 'worker' strategy. May be specified as [name=value] to give a different value per worker mnemonic. 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 --experimental_worker_multiplex. May be specified as [name=value] to give a different value per worker mnemonic. 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
False
Allows multiple
True
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"
        },
        {
            "description": "This option is explicitly mentioned in the output directory.",
            "name": "explicit_in_output_path"
        }
    ]
}