allbuildtestrunquerystartup options
--action_env=<'name=value' assignment with an optional value part>
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.
may be used multiple times
action command_lines
--all=<true or false>
Fetches all external repositories necessary for building any target or repository. This is the default if no other flags and arguments are provided. Only works when --enable_bzlmod is on.
default: "false"
changes inputs
--allow_analysis_cache_discard=<true or false>
If discarding the analysis cache due to a change in the build system, setting this option to false will cause bazel to exit, rather than continuing with the build. This option has no effect when 'discard_analysis_cache' is also set.
default: "true"
eagerness to_exit
--allow_analysis_failures=<true or false>
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.
default: "false"
loading and_analysis
experimental
--allow_yanked_versions=<string>
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).
may be used multiple times
loading and_analysis
--analysis_testing_deps_limit=<integer>
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.
default: "2000"
loading and_analysis
--android_compiler=<string>
The Android target compiler.
default: see description
affects outputs
loading and_analysis
loses incremental_state
--android_cpu=<string>
The Android target CPU.
default: "armeabi-v7a"
affects outputs
loading and_analysis
loses incremental_state
--android_crosstool_top=<build target label>
The location of the C++ compiler used for Android builds.
default: "//external:android/crosstool"
affects outputs
changes inputs
loading and_analysis
loses incremental_state
--android_databinding_use_androidx=<true or false>
Generate AndroidX-compatible data-binding files. This is only used with databinding v2. This flag is a no-op.
default: "true"
affects outputs
loading and_analysis
loses incremental_state
experimental
--android_databinding_use_v3_4_args=<true or false>
Use android databinding v2 with 3.4.0 argument. This flag is a no-op.
default: "true"
affects outputs
loading and_analysis
loses incremental_state
experimental
--android_dynamic_mode=<off, default or fully>
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.
default: "off"
affects outputs
loading and_analysis
--android_grte_top=<label>
The Android target grte_top.
default: see description
changes inputs
loading and_analysis
loses incremental_state
--android_manifest_merger=<legacy, android or force_android>
Selects the manifest merger to use for android_binary rules. Flag to help thetransition to the Android manifest merger from the legacy merger.
default: "android"
affects outputs
loading and_analysis
loses incremental_state
--android_manifest_merger_order=<alphabetical, alphabetical_by_configuration or dependency>
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.
default: "alphabetical"
action command_lines
execution
--android_platforms=<build target label>
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.
default: ""
changes inputs
loading and_analysis
loses incremental_state
--android_resource_shrinking=<true or false>
Enables resource shrinking for android_binary APKs that use ProGuard.
default: "false"
affects outputs
loading and_analysis
--android_sdk=<build target label>
Specifies Android SDK/platform that is used to build Android applications.
default: "@bazel_tools//tools/android:sdk"
changes inputs
loading and_analysis
loses incremental_state
--announce_rc=<true or false>
Whether to announce rc options.
default: "false"
affects outputs
--apk_signing_method=<v1, v2, v1_v2 or v4>
Implementation to use to sign APKs
default: "v1_v2"
action command_lines
affects outputs
loading and_analysis
--apple_crosstool_top=<build target label>
The label of the crosstool package to be used in Apple and Objc rules and their dependencies.
default: "@bazel_tools//tools/cpp:toolchain"
loses incremental_state
changes inputs
--apple_generate_dsym=<true or false>
Whether to generate debug symbol(.dSYM) file(s).
default: "false"
affects outputs
action command_lines
--aspects=<comma-separated list of options>
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
may be used multiple times
--aspects_parameters=<'name=value' assignment>
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.
may be used multiple times
loading and_analysis
--attempt_to_print_relative_paths=<true or false>
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.
default: "false"
terminal output
--auto_cpu_environment_group=<build target label>
Declare the environment_group to use for automatically mapping cpu values to target_environment values.
default: ""
changes inputs
loading and_analysis
experimental
--auto_output_filter=<none, all, packages or subpackages>
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)'.
default: "none"
--bep_maximum_open_remote_upload_files=<integer>
Maximum number of open files allowed during BEP artifact upload.
default: "-1"
affects outputs
--bes_backend=<string>
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.
default: ""
affects outputs
--bes_check_preceding_lifecycle_events=<true or false>
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.
default: "false"
affects outputs
--bes_header=<'name=value' assignment>
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.
may be used multiple times
affects outputs
--bes_instance_name=<string>
Specifies the instance name under which the BES will persist uploaded BEP. Defaults to null.
default: see description
affects outputs
--bes_keywords=<comma-separated list of options>
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.
may be used multiple times
affects outputs
--bes_lifecycle_events=<true or false>
Specifies whether to publish BES lifecycle events. (defaults to 'true').
default: "true"
affects outputs
--bes_oom_finish_upload_timeout=<An immutable length of time.>
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.
default: "10m"
bazel monitoring
--bes_outerr_buffer_size=<integer>
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.
default: "10240"
affects outputs
--bes_outerr_chunk_size=<integer>
Specifies the maximal size of stdout or stderr to be sent to BEP in a single message.
default: "1048576"
affects outputs
--bes_proxy=<string>
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).
default: see description
--bes_results_url=<string>
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.
default: ""
terminal output
--bes_system_keywords=<comma-separated list of options>
Specifies a list of notification keywords to be included directly, without the "user_keyword=" prefix included for keywords supplied via -- bes_keywords. Intended for Build service operators that set -- bes_lifecycle_events=false and include keywords when calling PublishLifecycleEvent. Build service operators using this flag should prevent users from overriding the flag value.
may be used multiple times
affects outputs
--bes_timeout=<An immutable length of time.>
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.
default: "0s"
affects outputs
--bes_upload_mode=<wait_for_upload_complete, nowait_for_upload_complete or fully_async>
Specifies whether the Build Event Service upload should block the build completion or should end the invocation immediately and finish the upload in the background. Either 'wait_for_upload_complete' (default), 'nowait_for_upload_complete', or 'fully_async'.
default: "wait_for_upload_complete"
eagerness to_exit
--break_build_on_parallel_dex2oat_failure=<true or false>
If true dex2oat action failures will cause the build to break instead of executing dex2oat during test runtime.
default: "false"
loading and_analysis
experimental
--build=<true or false>
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.
default: "true"
execution
affects outputs
--build_event_binary_file=<string>
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.
default: ""
affects outputs
--build_event_binary_file_path_conversion=<true or false>
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
default: "true"
affects outputs
--build_event_binary_file_upload_mode=<wait_for_upload_complete, nowait_for_upload_complete or fully_async>
Specifies whether the Build Event Service upload for -- build_event_binary_file should block the build completion or should end the invocation immediately and finish the upload in the background. Either 'wait_for_upload_complete' (default), 'nowait_for_upload_complete', or 'fully_async'.
default: "wait_for_upload_complete"
eagerness to_exit
--build_event_json_file=<string>
If non-empty, write a JSON serialisation of the build event protocol to that file. This option implies --bes_upload_mode=wait_for_upload_complete.
default: ""
affects outputs
--build_event_json_file_path_conversion=<true or false>
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
default: "true"
affects outputs
--build_event_json_file_upload_mode=<wait_for_upload_complete, nowait_for_upload_complete or fully_async>
Specifies whether the Build Event Service upload for -- build_event_json_file should block the build completion or should end the invocation immediately and finish the upload in the background. Either 'wait_for_upload_complete' (default), 'nowait_for_upload_complete', or 'fully_async'.
default: "wait_for_upload_complete"
eagerness to_exit
--build_event_max_named_set_of_file_entries=<integer>
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.
default: "-1"
affects outputs
--build_event_publish_all_actions=<true or false>
Whether all actions should be published.
default: "false"
affects outputs
--build_event_text_file=<string>
If non-empty, write a textual representation of the build event protocol to that file
default: ""
affects outputs
--build_event_text_file_path_conversion=<true or false>
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
default: "true"
affects outputs
--build_event_text_file_upload_mode=<wait_for_upload_complete, nowait_for_upload_complete or fully_async>
Specifies whether the Build Event Service upload for -- build_event_text_file should block the build completion or should end the invocation immediately and finish the upload in the background. Either 'wait_for_upload_complete' (default), 'nowait_for_upload_complete', or 'fully_async'.
default: "wait_for_upload_complete"
eagerness to_exit
--build_manual_tests=<true or false>
Forces test targets tagged 'manual' to be built. 'manual' tests are excluded from processing. This option forces them to be built (but not executed).
default: "false"
--build_metadata=<'name=value' assignment>
Custom key-value string pairs to supply in a build event.
may be used multiple times
terminal output
--build_python_zip=<tri-state (auto, yes, no)>
Build python executable zip; on on Windows, off on other platforms
default: "auto"
affects outputs
--build_runfile_links=<true or false>
If true, build runfiles symlink forests for all targets. If false, write them only when required by a local action, test or run command.
default: "true"
affects outputs
--build_runfile_manifests=<true or false>
If true, write runfiles manifests for all targets. If false, omit them. Local tests will fail to run when false.
default: "true"
affects outputs
--build_tag_filters=<comma-separated list of options>
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'
default: ""
--build_test_dwp=<true or false>
If enabled, when building C++ tests statically and with fission the .dwp file for the test binary will be automatically built as well.
default: "false"
loading and_analysis
affects outputs
--build_tests_only=<true or false>
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.
default: "false"
--cache_computed_file_digests=<long integer>
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.
default: "50000"
--cache_test_results=<tri-state (auto, yes, no)>
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.
default: "auto"
--catalyst_cpus=<comma-separated list of options>
Comma-separated list of architectures for which to build Apple Catalyst binaries.
may be used multiple times
loses incremental_state
loading and_analysis
--cc_output_directory_tag=<string>
Specifies a suffix to be added to the configuration directory.
default: ""
affects outputs
--cc_proto_library_header_suffixes=<comma-separated set of options>
Sets the suffixes of header files that a cc_proto_library creates.
default: ".pb.h"
affects outputs
loading and_analysis
--cc_proto_library_source_suffixes=<comma-separated set of options>
Sets the suffixes of source files that a cc_proto_library creates.
default: ".pb.cc"
affects outputs
loading and_analysis
--check_bazel_compatibility=<error, warning or off>
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.
default: "error"
loading and_analysis
--check_bzl_visibility=<true or false>
If disabled, .bzl load visibility errors are demoted to warnings.
default: "true"
build file_semantics
--check_direct_dependencies=<off, warning or error>
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.
default: "warning"
loading and_analysis
--check_licenses=<true or false>
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.
default: "false"
build file_semantics
--check_tests_up_to_date=<true or false>
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. Using this option will also add: --check_up_to_date
default: "false"
execution
--check_up_to_date=<true or false>
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.
default: "false"
execution
--check_visibility=<true or false>
If disabled, visibility errors in target dependencies are demoted to warnings.
default: "true"
build file_semantics
--collect_code_coverage=<true or false>
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.
default: "false"
affects outputs
--color=<yes, no or auto>
Use terminal controls to colorize output.
default: "auto"
--combined_report=<none or lcov>
Specifies desired cumulative coverage report type. At this point only LCOV is supported.
default: "none"
--compilation_mode=<fastbuild, dbg or opt>
Specify the mode the binary will be built in. Values: 'fastbuild', 'dbg', 'opt'.
default: "fastbuild"
affects outputs
action command_lines
--compile_one_dependency=<true or false>
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.
default: "false"
--compiler=<string>
The C++ compiler to use for compiling the target.
default: see description
loading and_analysis
execution
--config=<string>
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.
may be used multiple times
--configure=<true or false>
Only fetches repositories marked as 'configure' for system-configuration purpose. Only works when --enable_bzlmod is on.
default: "false"
changes inputs
--conlyopt=<string>
Additional option to pass to gcc when compiling C source files.
may be used multiple times
action command_lines
affects outputs
--copt=<string>
Additional options to pass to gcc.
may be used multiple times
action command_lines
affects outputs
--coverage_output_generator=<build target label>
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'.
default: "@bazel_tools//tools/test:lcov_merger"
changes inputs
affects outputs
loading and_analysis
--coverage_report_generator=<build target label>
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'.
default: "@bazel_tools//tools/test:coverage_report_generator"
changes inputs
affects outputs
loading and_analysis
--coverage_support=<build target label>
Location of support files that are required on the inputs of every test action that collects code coverage. Defaults to '//tools/test: coverage_support'.
default: "@bazel_tools//tools/test:coverage_support"
changes inputs
affects outputs
loading and_analysis
--cpu=<string>
The target CPU.
default: ""
changes inputs
affects outputs
--credential_helper=<Path to a credential helper. It may be absolute, relative to the PATH environment variable, or %workspace%-relative. The path be optionally prefixed by a scope followed by an '='. The scope is a domain name, optionally with a single leading '*' wildcard component. A helper applies to URIs matching its scope, with more specific scopes preferred. If a helper has no scope, it applies to every URI.>
Configures a credential helper conforming to the <a href="https://github.com/EngFlow/credential-helper-spec">Credential Helper Specification</a> to use for retrieving authorization credentials for repository fetching, remote caching and execution, and the build event service.Credentials supplied by a helper take precedence over credentials supplied by `--google_default_credentials`, `--google_credentials`, a `.netrc` file, or the auth parameter to `repository_ctx.download()` and `repository_ctx.download_and_extract()`.May be specified multiple times to set up multiple helpers.See https://blog.engflow.com/2023/10/09/configuring-bazels-credential-helper/ for instructions.
may be used multiple times
--credential_helper_cache_duration=<An immutable length of time.>
The default duration for which credentials supplied by a credential helper are cached if the helper does not provide when the credentials expire.
default: "30m"
--credential_helper_timeout=<An immutable length of time.>
Configures the timeout for a credential helper.Credential helpers failing to respond within this timeout will fail the invocation.
default: "10s"
--crosstool_top=<build target label>
The label of the crosstool package to be used for compiling C++ code.
default: "@bazel_tools//tools/cpp:toolchain"
loading and_analysis
changes inputs
affects outputs
--cs_fdo_absolute_path=<string>
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.
default: see description
affects outputs
--cs_fdo_instrument=<string>
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. Using this option will also add: --copt=-Wno-error
default: see description
affects outputs
--cs_fdo_profile=<build target label>
The cs_fdo_profile representing the context sensitive profile to be used for optimization.
default: see description
affects outputs
--curses=<yes, no or auto>
Use terminal cursor controls to minimize scrolling output.
default: "auto"
--custom_malloc=<build target label>
Specifies a custom malloc implementation. This setting overrides malloc attributes in build rules.
default: see description
changes inputs
affects outputs
--cxxopt=<string>
Additional option to pass to gcc when compiling C++ source files.
may be used multiple times
action command_lines
affects outputs
--default_test_resources=<resource name followed by equal and 1 float or 4 float, e.g memory=10,30,60,100>
Override the default resources amount for tests. The expected format is <resource>=<value>. If a single positive number is specified as <value> it will override the default resources for all test sizes. If 4 comma-separated numbers are specified, they will override the resource amount for respectively the small, medium, large, enormous test sizes. Values can also be HOST_RAM/HOST_CPU, optionally followed by [-|*]<float> (eg. memory=HOST_RAM*.1,HOST_RAM*.2,HOST_RAM*.3,HOST_RAM*.4). The default test resources specified by this flag are overridden by explicit resources specified in tags.
may be used multiple times
--define=<'name=value' assignment>
Each --define option specifies an assignment for a build variable.
may be used multiple times
changes inputs
affects outputs
--deleted_packages=<comma-separated list of package names>
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.
may be used multiple times
--desugar_for_android=<true or false>
Whether to desugar Java 8 bytecode before dexing.
default: "true"
affects outputs
loading and_analysis
loses incremental_state
--desugar_java8_libs=<true or false>
Whether to include supported Java 8 libraries in apps for legacy devices.
default: "false"
affects outputs
loading and_analysis
loses incremental_state
experimental
--device_debug_entitlements=<true or false>
If set, and compilation mode is not 'opt', objc apps will include debug entitlements when signing.
default: "true"
changes inputs
--discard_analysis_cache=<true or false>
Discard the analysis cache immediately after the analysis phase completes. Reduces memory usage by ~10%, but makes further incremental builds slower.
default: "false"
--disk_cache=<path>
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.
default: see description
--distdir=<path>
Additional places to search for archives before accessing the network to download them.
may be used multiple times
bazel internal_configuration
--dynamic_local_execution_delay=<integer>
How many milliseconds should local execution be delayed, if remote execution was faster during a build at least once?
default: "1000"
execution
host machine_resource_optimizations
--dynamic_local_strategy=<'[name=]value1[,..,valueN]' assignment>
The local strategies, in order, to use for the given mnemonic - the first applicable strategy is used. For example, `worker,sandboxed` runs actions that support persistent workers using the worker strategy, and all others using the sandboxed strategy. If no mnemonic is given, the list of strategies is used as the fallback for all mnemonics. The default fallback list is `worker,sandboxed`, or`worker,sandboxed,standalone` if `experimental_local_lockfree_output` is set. Takes [mnemonic=]local_strategy [,local_strategy,...]
may be used multiple times
execution
host machine_resource_optimizations
--dynamic_mode=<off, default or fully>
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.
default: "default"
loading and_analysis
affects outputs
--dynamic_remote_strategy=<'[name=]value1[,..,valueN]' assignment>
The remote strategies, in order, to use for the given mnemonic - the first applicable strategy is used. If no mnemonic is given, the list of strategies is used as the fallback for all mnemonics. The default fallback list is `remote`, so this flag usually does not need to be set explicitly. Takes [mnemonic=]remote_strategy[,remote_strategy,...]
may be used multiple times
execution
host machine_resource_optimizations
--embed_label=<one-line string>
Embed source control revision or release label in binary
default: ""
--enable_bzlmod=<true or false>
If true, enables the Bzlmod dependency management system, taking precedence over WORKSPACE. See https://bazel.build/docs/bzlmod for more information.
default: "true"
loading and_analysis
--enable_fdo_profile_absolute_path=<true or false>
If set, use of fdo_absolute_profile_path will raise an error.
default: "true"
affects outputs
--enable_platform_specific_config=<true or false>
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.
default: "false"
--enable_runfiles=<tri-state (auto, yes, no)>
Enable runfiles symlink tree; By default, it's off on Windows, on on other platforms.
default: "auto"
affects outputs
--enable_workspace=<true or false>
If true, enables the legacy WORKSPACE system for external dependencies. See https://bazel.build/external/overview for more information.
default: "true"
loading and_analysis
--enforce_constraints=<true or false>
Checks the environments each target is compatible with and reports errors if any target has dependencies that don't support the same environments
default: "true"
build file_semantics
--execution_log_binary_file=<path>
Log the executed spawns into this file as length-delimited SpawnExec protos, according to src/main/protobuf/spawn.proto. Prefer --execution_log_compact_file, which is significantly smaller and cheaper to produce. Related flags: --execution_log_compact_file (compact format; mutually exclusive), --execution_log_json_file (text JSON format; mutually exclusive), --execution_log_sort (whether to sort the execution log), --subcommands (for displaying subcommands in terminal output).
default: see description
--execution_log_compact_file=<path>
Log the executed spawns into this file as length-delimited ExecLogEntry protos, according to src/main/protobuf/spawn.proto. The entire file is zstd compressed. Related flags: --execution_log_binary_file (binary protobuf format; mutually exclusive), --execution_log_json_file (text JSON format; mutually exclusive), --subcommands (for displaying subcommands in terminal output).
default: see description
--execution_log_json_file=<path>
Log the executed spawns into this file as newline-delimited JSON representations of SpawnExec protos, according to src/main/protobuf/spawn.proto. Prefer --execution_log_compact_file, which is significantly smaller and cheaper to produce. Related flags: --execution_log_compact_file (compact format; mutually exclusive), --execution_log_binary_file (binary protobuf format; mutually exclusive), --execution_log_sort (whether to sort the execution log), --subcommands (for displaying subcommands in terminal output).
default: see description
--execution_log_sort=<true or false>
Whether to sort the execution log, making it easier to compare logs across invocations. Set to false to avoid potentially significant CPU and memory usage at the end of the invocation, at the cost of producing the log in nondeterministic execution order. Only applies to the binary and JSON formats; the compact format is never sorted.
default: "true"
--expand_test_suites=<true or false>
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.
default: "true"
loading and_analysis
--experimental_action_listener=<build target label>
Deprecated in favor of aspects. Use action_listener to attach an extra_action to existing build actions.
may be used multiple times
execution
experimental
--experimental_action_resource_set=<true or false>
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.
default: "true"
execution
build file_semantics
experimental
--experimental_add_exec_constraints_to_targets=<'<RegexFilter>=<label1>[,<label2>,...]' assignment>
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'.
may be used multiple times
loading and_analysis
--experimental_android_compress_java_resources=<true or false>
Compress Java resources in APKs
default: "false"
affects outputs
loading and_analysis
experimental
--experimental_android_databinding_v2=<true or false>
Use android databinding v2. This flag is a no-op.
default: "true"
affects outputs
loading and_analysis
loses incremental_state
experimental
--experimental_android_resource_shrinking=<true or false>
Enables resource shrinking for android_binary APKs that use ProGuard.
default: "false"
affects outputs
loading and_analysis
--experimental_android_rewrite_dexes_with_rex=<true or false>
use rex tool to rewrite dex files
default: "false"
affects outputs
loading and_analysis
loses incremental_state
experimental
--experimental_android_use_parallel_dex2oat=<true or false>
Use dex2oat in parallel to possibly speed up android_test.
default: "false"
loading and_analysis
host machine_resource_optimizations
experimental
--experimental_announce_profile_path=<true or false>
If enabled, adds the JSON profile path to the log.
default: "false"
bazel monitoring
--experimental_bep_target_summary=<true or false>
Whether to publish TargetSummary events.
default: "false"
--experimental_build_event_expand_filesets=<true or false>
If true, expand Filesets in the BEP when presenting output files.
default: "false"
affects outputs
--experimental_build_event_fully_resolve_fileset_symlinks=<true or false>
If true, fully resolve relative Fileset symlinks in the BEP when presenting output files. Requires --experimental_build_event_expand_filesets.
default: "false"
affects outputs
--experimental_build_event_upload_max_retries=<integer>
The maximum number of times Bazel should retry uploading a build event.
default: "4"
bazel internal_configuration
--experimental_build_event_upload_retry_minimum_delay=<An immutable length of time.>
Initial, minimum delay for exponential backoff retries when BEP upload fails. (exponent: 1.6)
default: "1s"
bazel internal_configuration
--experimental_build_event_upload_strategy=<string>
Selects how to upload artifacts referenced in the build event protocol.
default: see description
affects outputs
--experimental_bzl_visibility=<true or false>
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.
default: "true"
loading and_analysis
experimental
--experimental_cancel_concurrent_tests=<true or false>
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.
default: "false"
affects outputs
loading and_analysis
--experimental_cc_shared_library=<true or false>
If set to true, rule attributes and Starlark API methods needed for the rule cc_shared_library will be available
default: "false"
build file_semantics
loading and_analysis
experimental
--experimental_cc_static_library=<true or false>
If set to true, rule attributes and Starlark API methods needed for the rule cc_static_library will be available
default: "false"
build file_semantics
loading and_analysis
experimental
--experimental_check_desugar_deps=<true or false>
Whether to double-check correct desugaring at Android binary level.
default: "true"
eagerness to_exit
loading and_analysis
experimental
--experimental_circuit_breaker_strategy=<failure>
Specifies the strategy for the circuit breaker to use. Available strategies are "failure". On invalid value for the option the behavior same as the option is not set.
default: see description
execution
--experimental_collect_code_coverage_for_generated_files=<true or false>
If specified, Bazel will also generate collect coverage information for generated files.
default: "false"
affects outputs
--experimental_collect_load_average_in_profiler=<true or false>
If enabled, the profiler collects the system's overall load average.
default: "true"
bazel monitoring
--experimental_collect_local_sandbox_action_metrics=<true or false>
Deprecated no-op.
default: "true"
execution
--experimental_collect_pressure_stall_indicators=<true or false>
If enabled, the profiler collects the Linux PSI data.
default: "false"
bazel monitoring
--experimental_collect_resource_estimation=<true or false>
If enabled, the profiler collects CPU and memory usage estimation for local actions.
default: "false"
bazel monitoring
--experimental_collect_system_network_usage=<true or false>
If enabled, the profiler collects the system's network usage.
default: "false"
bazel monitoring
--experimental_collect_worker_data_in_profiler=<true or false>
If enabled, the profiler collects worker's aggregated resource data.
default: "false"
bazel monitoring
--experimental_command_profile=<cpu, wall, alloc or lock>
Records a Java Flight Recorder profile for the duration of the command. One of the supported profiling event types (cpu, wall, alloc or lock) must be given as an argument. The profile is written to a file named after the event type under the output base directory. The syntax and semantics of this flag might change in the future to support additional profile types or output formats; use at your own risk.
default: see description
--experimental_convenience_symlinks=<normal, clean, ignore or log_only>
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.
default: "normal"
affects outputs
--experimental_convenience_symlinks_bep_event=<true or false>
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.
default: "false"
affects outputs
--experimental_disable_external_package=<true or false>
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.
default: "false"
loading and_analysis
loses incremental_state
experimental
--experimental_disk_cache_gc_idle_delay=<An immutable length of time.>
How long the server must remain idle before a garbage collection of the disk cache occurs. To specify the garbage collection policy, set --experimental_disk_cache_gc_max_size and/or --experimental_disk_cache_gc_max_age.
default: "5m"
--experimental_disk_cache_gc_max_age=<An immutable length of time.>
If set to a positive value, the disk cache will be periodically garbage collected to remove entries older than this age. If set in conjunction with --experimental_disk_cache_gc_max_size, both criteria are applied. Garbage collection occurrs in the background once the server has become idle, as determined by the --experimental_disk_cache_gc_idle_delay flag.
default: "0"
--experimental_disk_cache_gc_max_size=<size in bytes, optionally followed by a K, M, G or T multiplier>
If set to a positive value, the disk cache will be periodically garbage collected to stay under this size. If set in conjunction with --experimental_disk_cache_gc_max_age, both criteria are applied. Garbage collection occurrs in the background once the server has become idle, as determined by the --experimental_disk_cache_gc_idle_delay flag.
default: "0"
--experimental_docker_image=<string>
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.
default: ""
execution
--experimental_docker_privileged=<true or false>
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.
default: "false"
execution
--experimental_docker_use_customized_images=<true or false>
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.
default: "true"
execution
--experimental_docker_verbose=<true or false>
If enabled, Bazel will print more verbose messages about the Docker sandbox strategy.
default: "false"
execution
--experimental_downloader_config=<string>
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.
default: see description
--experimental_dynamic_exclude_tools=<true or false>
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.
default: "true"
execution
host machine_resource_optimizations
--experimental_dynamic_ignore_local_signals=<comma-separated list of signal numbers>
Takes a list of OS signal numbers. If a local branch of dynamic execution gets killed with any of these signals, the remote branch will be allowed to finish instead. For persistent workers, this only affects signals that kill the worker process.
default: see description
execution
--experimental_dynamic_local_load_factor=<double>
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.
default: "0"
execution
host machine_resource_optimizations
--experimental_dynamic_slow_remote_time=<An immutable length of time.>
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.
default: "0"
execution
host machine_resource_optimizations
--experimental_enable_android_migration_apis=<true or false>
If set to true, enables the APIs required to support the Android Starlark migration.
default: "false"
build file_semantics
--experimental_enable_docker_sandbox=<true or false>
Enable Docker-based sandboxing. This option has no effect if Docker is not installed.
default: "false"
execution
--experimental_enable_scl_dialect=<true or false>
If set to true, .scl files may be used in load() statements.
default: "false"
build file_semantics
--experimental_extra_action_filter=<comma-separated list of regex expressions with prefix '-' specifying excluded paths>
Deprecated in favor of aspects. Filters set of targets to schedule extra_actions for.
default: ""
--experimental_extra_action_top_level_only=<true or false>
Deprecated in favor of aspects. Only schedules extra_actions for top level targets.
default: "false"
--experimental_fetch_all_coverage_outputs=<true or false>
If true, then Bazel fetches the entire coverage data directory for each test during a coverage run.
default: "false"
affects outputs
loading and_analysis
--experimental_filter_library_jar_with_program_jar=<true or false>
Filter the ProGuard ProgramJar to remove any classes also present in the LibraryJar.
default: "false"
action command_lines
--experimental_generate_llvm_lcov=<true or false>
If true, coverage for clang will generate an LCOV report.
default: "false"
affects outputs
loading and_analysis
--experimental_google_legacy_api=<true or false>
If set to true, exposes a number of experimental pieces of Starlark build API pertaining to Google legacy code.
default: "false"
loading and_analysis
experimental
--experimental_guard_against_concurrent_changes=<true or false>
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.
default: "false"
--experimental_import_deps_checking=<off, warning or error>
When enabled, check whether the dependencies of an aar_import are complete. This enforcement can break the build, or can just result in warnings.
default: "OFF"
loading and_analysis
--experimental_include_xcode_execution_requirements=<true or false>
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.
default: "false"
loses incremental_state
loading and_analysis
execution
--experimental_inmemory_dotd_files=<true or false>
If enabled, C++ .d files will be passed through in memory directly from the remote build nodes instead of being written to disk.
default: "true"
loading and_analysis
execution
affects outputs
experimental
--experimental_inmemory_jdeps_files=<true or false>
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.
default: "true"
loading and_analysis
execution
affects outputs
experimental
--experimental_inmemory_sandbox_stashes=<true or false>
If set to true, the contents of stashed sandboxes for reuse_sandbox_directories will be tracked in memory. This reduces the amount of I/O needed during reuse. Depending on the build this flag may improve wall time. Depending on the build as well this flag may use a significant amount of additional memory.
default: "false"
host machine_resource_optimizations
execution
--experimental_inprocess_symlink_creation=<true or false>
Whether to make direct file system calls to create symlink trees
default: "false"
loading and_analysis
execution
experimental
--experimental_isolated_extension_usages=<true or false>
If true, enables the <code>isolate</code> parameter in the <a href="https: //bazel.build/rules/lib/globals/module#use_extension" ><code>use_extension</code></a> function.
default: "false"
loading and_analysis
--experimental_j2objc_header_map=<true or false>
Whether to generate J2ObjC header map in parallel of J2ObjC transpilation.
default: "true"
--experimental_j2objc_shorter_header_path=<true or false>
Whether to generate with shorter header path (uses "_ios" instead of "_j2objc").
default: "false"
affects outputs
--experimental_java_classpath=<off, javabuilder or bazel>
Enables reduced classpaths for Java compilations.
default: "javabuilder"
--experimental_java_library_export=<true or false>
If enabled, experimental_java_library_export_do_not_use module is available.
default: "false"
loading and_analysis
incompatible change
--experimental_limit_android_lint_to_android_constrained_java=<true or false>
Limit --experimental_run_android_lint_on_java_rules to Android-compatible libraries.
default: "false"
affects outputs
--experimental_materialize_param_files_directly=<true or false>
If materializing param files, do so with direct writes to disk.
default: "false"
execution
--experimental_objc_fastbuild_options=<comma-separated list of options>
Uses these strings as objc fastbuild compiler options.
default: "-O0,-DDEBUG=1"
action command_lines
--experimental_objc_include_scanning=<true or false>
Whether to perform include scanning for objective C/C++.
default: "false"
loading and_analysis
execution
changes inputs
--experimental_omitfp=<true or false>
If true, use libunwind for stack unwinding, and compile with -fomit-frame- pointer and -fasynchronous-unwind-tables.
default: "false"
action command_lines
affects outputs
experimental
--experimental_one_version_enforcement=<off, warning or error>
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.
default: "OFF"
loading and_analysis
--experimental_output_paths=<off, content or strip>
Which model to use for where in the output tree rules write their outputs, particularly for multi-platform / multi-configuration builds. This is highly experimental. See https://github.com/bazelbuild/bazel/issues/6526 for details. Starlark actions canopt into path mapping by adding the key 'supports-path-mapping' to the 'execution_requirements' dict.
default: "off"
loses incremental_state
bazel internal_configuration
affects outputs
execution
--experimental_override_name_platform_in_output_dir=<'label=value' assignment>
Each entry should be of the form label=value where label refers to a platform and values is the desired shortname to use in the output path. Only used when --experimental_platform_in_output_dir is true. Has highest naming priority.
may be used multiple times
affects outputs
experimental
--experimental_parallel_aquery_output=<true or false>
No-op.
default: "true"
--experimental_persistent_aar_extractor=<true or false>
Enable persistent aar extractor by using workers.
default: "false"
execution
--experimental_platform_in_output_dir=<true or false>
If true, a shortname for the target platform is used in the output directory name instead of the CPU. The exact scheme is experimental and subject to change: First, in the rare case the --platforms option does not have exactly one value, a hash of the platforms option is used. Next, if any shortname for the current platform was registered by -- experimental_override_name_platform_in_output_dir, then that shortname is used. Then, if --experimental_use_platforms_in_output_dir_legacy_heuristic is set, use a shortname based off the current platform Label. Finally, a hash of the platform option is used as a last resort.
default: "false"
affects outputs
experimental
--experimental_platforms_api=<true or false>
If set to true, enables a number of platform-related Starlark APIs useful for debugging.
default: "false"
loading and_analysis
experimental
--experimental_prefer_mutual_xcode=<true or false>
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.
default: "true"
loses incremental_state
--experimental_profile_additional_tasks=<phase, action, action_check, action_lock, action_release, action_update, action_complete, bzlmod, info, create_package, remote_execution, local_execution, scanner, local_parse, upload_time, remote_process_time, remote_queue, remote_setup, fetch, local_process_time, vfs_stat, vfs_dir, vfs_readlink, vfs_md5, vfs_xattr, vfs_delete, vfs_open, vfs_read, vfs_write, vfs_glob, vfs_vmfs_stat, vfs_vmfs_dir, vfs_vmfs_read, wait, thread_name, thread_sort_index, skyframe_eval, skyfunction, critical_path, critical_path_component, handle_gc_notification, action_counts, action_cache_counts, local_cpu_usage, system_cpu_usage, cpu_usage_estimation, local_memory_usage, system_memory_usage, memory_usage_estimation, system_network_up_usage, system_network_down_usage, workers_memory_usage, system_load_average, starlark_parser, starlark_user_fn, starlark_builtin_fn, starlark_user_compiled_fn, starlark_repository_fn, action_fs_staging, remote_cache_check, remote_download, remote_network, filesystem_traversal, worker_execution, worker_setup, worker_borrow, worker_working, worker_copying_outputs, credential_helper, pressure_stall_io, pressure_stall_memory, conflict_check, dynamic_lock, repository_fetch, repository_vendor or unknown>
Specifies additional profile tasks to be included in the profile.
may be used multiple times
bazel monitoring
--experimental_profile_include_primary_output=<true or false>
Includes the extra "out" attribute in action events that contains the exec path to the action's primary output.
default: "false"
bazel monitoring
--experimental_profile_include_target_label=<true or false>
Includes target label in action events' JSON profile data.
default: "false"
bazel monitoring
--experimental_proto_descriptor_sets_include_source_info=<true or false>
Run extra actions for alternative Java api versions in a proto_library.
default: "false"
affects outputs
loading and_analysis
experimental
--experimental_proto_extra_actions=<true or false>
Run extra actions for alternative Java api versions in a proto_library.
default: "false"
affects outputs
loading and_analysis
experimental
--experimental_record_metrics_for_all_mnemonics=<true or false>
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.
default: "false"
--experimental_remotable_source_manifests=<true or false>
Whether to make source manifest actions remotable
default: "false"
loading and_analysis
execution
experimental
--experimental_remote_cache_async=<true or false>
If true, remote cache I/O will happen in the background instead of taking place as the part of a spawn.
default: "false"
--experimental_remote_cache_compression_threshold=<integer>
The minimum blob size required to compress/decompress with zstd. Ineffectual unless --remote_cache_compression is set.
default: "0"
--experimental_remote_cache_eviction_retries=<integer>
The maximum number of attempts to retry if the build encountered a transient remote cache error that would otherwise fail the build. Applies for example when artifacts are evicted from the remote cache, or in certain cache failure conditions. A non-zero value will implicitly set -- incompatible_remote_use_new_exit_code_for_lost_inputs to true. A new invocation id will be generated for each attempt. If you generate invocation id and provide it to Bazel with --invocation_id, you should not use this flag. Instead, set flag -- incompatible_remote_use_new_exit_code_for_lost_inputs and check for the exit code 39.
default: "0"
execution
--experimental_remote_cache_lease_extension=<true or false>
If set to true, Bazel will extend the lease for outputs of remote actions during the build by sending `FindMissingBlobs` calls periodically to remote cache. The frequency is based on the value of `--experimental_remote_cache_ttl`.
default: "false"
--experimental_remote_cache_ttl=<An immutable length of time.>
The guaranteed minimal TTL of blobs in the remote cache after their digests are recently referenced e.g. by an ActionResult or FindMissingBlobs. Bazel does several optimizations based on the blobs' TTL e.g. doesn't repeatedly call GetActionResult in an incremental build. The value should be set slightly less than the real TTL since there is a gap between when the server returns the digests and when Bazel receives them.
default: "3h"
execution
--experimental_remote_capture_corrupted_outputs=<path>
A path to a directory where the corrupted outputs will be captured to.
default: see description
--experimental_remote_discard_merkle_trees=<true or false>
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.
default: "false"
--experimental_remote_downloader=<string>
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
default: see description
--experimental_remote_downloader_local_fallback=<true or false>
Whether to fall back to the local downloader if remote downloader fails.
default: "false"
--experimental_remote_execution_keepalive=<true or false>
Whether to use keepalive for remote execution calls.
default: "false"
--experimental_remote_failure_rate_threshold=<integer in 0-100 range>
Sets the allowed number of failure rate in percentage for a specific time window after which it stops calling to the remote cache/executor. By default the value is 10. Setting this to 0 means no limitation.
default: "10"
execution
--experimental_remote_failure_window_interval=<An immutable length of time.>
The interval in which the failure rate of the remote requests are computed. On zero or negative value the failure duration is computed the whole duration of the execution.Following units can be used: Days (d), hours (h), minutes (m), seconds (s), and milliseconds (ms). If the unit is omitted, the value is interpreted as seconds.
default: "60s"
execution
--experimental_remote_mark_tool_inputs=<true or false>
If set to true, Bazel will mark inputs as tool inputs for the remote executor. This can be used to implement remote persistent workers.
default: "false"
--experimental_remote_merkle_tree_cache=<true or false>
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.
default: "false"
--experimental_remote_merkle_tree_cache_size=<long integer>
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.
default: "1000"
--experimental_remote_output_service=<string>
HOST or HOST:PORT of a remote output service 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.
default: see description
--experimental_remote_output_service_output_path_prefix=<string>
The path under which the contents of output directories managed by the --experimental_remote_output_service are placed. The actual output directory used by a build will be a descendant of this path and determined by the output service.
default: ""
--experimental_remote_require_cached=<true or false>
If set to true, enforce that all actions that can run remotely are cached, or else fail the build. This is useful to troubleshoot non-determinism issues as it allows checking whether actions that should be cached are actually cached without spuriously injecting new results into the cache.
default: "false"
--experimental_remote_scrubbing_config=<Converts to a Scrubber>
Enables remote cache key scrubbing with the supplied configuration file, which must be a protocol buffer in text format (see src/main/protobuf/remote_scrubbing.proto).This feature is intended to facilitate sharing a remote/disk cache between actions executing on different platforms but targeting the same platform. It should be used with extreme care, as improper settings may cause accidental sharing of cache entries and result in incorrect builds.Scrubbing does not affect how an action is executed, only how its remote/disk cache key is computed for the purpose of retrieving or storing an action result. Scrubbed actions are incompatible with remote execution, and will always be executed locally instead.Modifying the scrubbing configuration does not invalidate outputs present in the local filesystem or internal caches; a clean build is required to reexecute affected actions.In order to successfully use this feature, you likely want to set a custom --host_platform together with --experimental_platform_in_output_dir (to normalize output prefixes) and --incompatible_strict_action_env (to normalize environment variables).
default: see description
--experimental_repo_remote_exec=<true or false>
If set to true, repository_rule gains some remote execution capabilities.
default: "false"
build file_semantics
loading and_analysis
experimental
--experimental_repository_cache_hardlinks=<true or false>
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.
default: "false"
bazel internal_configuration
--experimental_repository_downloader_retries=<integer>
The maximum number of attempts to retry a download error. If set to 0, retries are disabled.
default: "0"
experimental
--experimental_repository_resolved_file=<string>
If non-empty, write a Starlark value with the resolved information of all Starlark repository rules that were executed.
default: ""
affects outputs
--experimental_resolved_file_instead_of_workspace=<string>
If non-empty read the specified resolved file instead of the WORKSPACE file
default: ""
changes inputs
--experimental_retain_test_configuration_across_testonly=<true or false>
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.
default: "false"
loading and_analysis
loses incremental_state
--experimental_rule_extension_api=<true or false>
Enable experimental rule extension API and subrule APIs
default: "false"
loading and_analysis
experimental
--experimental_run_android_lint_on_java_rules=<true or false>
Whether to validate java_* sources.
default: "false"
affects outputs
--experimental_run_bep_event_include_residue=<true or false>
Whether to include the command-line residue in run build events which could contain the residue. By default, the residue is not included in run command build events that could contain the residue.
default: "false"
affects outputs
--experimental_sandbox_async_tree_delete_idle_threads=<integer, or a keyword ("auto", "HOST_CPUS", "HOST_RAM"), optionally followed by an operation ([-|*]<float>) eg. "auto", "HOST_CPUS*.5">
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.
default: "4"
host machine_resource_optimizations
execution
--experimental_sandbox_memory_limit_mb=<integer number of MBs, or "HOST_RAM", optionally followed by [-|*]<float>.>
If > 0, each Linux sandbox will be limited to the given amount of memory (in MB). Requires cgroups v1 or v2 and permissions for the users to the cgroups dir.
default: "0"
execution
--experimental_sandboxfs_map_symlink_targets=<true or false>
No-op
default: "false"
host machine_resource_optimizations
execution
--experimental_save_feature_state=<true or false>
Save the state of enabled and requested feautres as an output of compilation.
default: "false"
affects outputs
experimental
--experimental_scale_timeouts=<double>
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
default: "1.0"
bazel internal_configuration
experimental
--experimental_shrink_worker_pool=<true or false>
If enabled, could shrink worker pool if worker memory pressure is high. This flag works only when flag experimental_total_worker_memory_limit_mb is enabled.
default: "false"
execution
host machine_resource_optimizations
--experimental_sibling_repository_layout=<true or false>
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.
default: "false"
action command_lines
bazel internal_configuration
loading and_analysis
loses incremental_state
experimental
--experimental_spawn_scheduler
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. Expands to: --internal_spawn_scheduler --spawn_strategy=dynamic
--experimental_split_coverage_postprocessing=<true or false>
If true, then Bazel will run coverage postprocessing for test in a new spawn.
default: "false"
execution
--experimental_split_xml_generation=<true or false>
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.
default: "true"
execution
--experimental_starlark_cc_import=<true or false>
If enabled, the Starlark version of cc_import can be used.
default: "false"
loading and_analysis
experimental
--experimental_stream_log_file_uploads=<true or false>
Stream log file uploads directly to the remote storage rather than writing them to disk.
default: "false"
affects outputs
--experimental_strict_fileset_output=<true or false>
If this option is enabled, filesets will treat all output artifacts as regular files. They will not traverse directories or be sensitive to symlinks.
default: "false"
execution
--experimental_strict_java_deps=<off, warn, error, strict or default>
If true, checks that a Java target explicitly declares all directly used targets as dependencies.
default: "default"
build file_semantics
eagerness to_exit
--experimental_total_worker_memory_limit_mb=<integer number of MBs, or "HOST_RAM", optionally followed by [-|*]<float>.>
If this limit is greater than zero idle workers might be killed if the total memory usage of all workers exceed the limit.
default: "0"
execution
host machine_resource_optimizations
--experimental_ui_max_stdouterr_bytes=<integer in (-1)-1073741819 range>
The maximum size of the stdout / stderr files that will be printed to the console. -1 implies no limit.
default: "1048576"
execution
--experimental_unsupported_and_brittle_include_scanning=<true or false>
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.
default: "false"
loading and_analysis
execution
changes inputs
--experimental_use_hermetic_linux_sandbox=<true or false>
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.
default: "false"
execution
--experimental_use_llvm_covmap=<true or false>
If specified, Bazel will generate llvm-cov coverage map information rather than gcov when collect_code_coverage is enabled.
default: "false"
changes inputs
affects outputs
loading and_analysis
experimental
--experimental_use_platforms_in_output_dir_legacy_heuristic=<true or false>
Please only use this flag as part of a suggested migration or testing strategy. Note that the heuristic has known deficiencies and it is suggested to migrate to relying on just -- experimental_override_name_platform_in_output_dir.
default: "true"
affects outputs
experimental
--experimental_use_semaphore_for_jobs=<true or false>
If set to true, additionally use semaphore to limit number of concurrent jobs.
default: "true"
host machine_resource_optimizations
execution
--experimental_use_validation_aspect=<true or false>
Whether to run validation actions using aspect (for parallelism with tests).
default: "false"
execution
affects outputs
--experimental_use_windows_sandbox=<tri-state (auto, yes, no)>
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.
default: "false"
execution
--experimental_windows_sandbox_path=<string>
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.
default: "BazelSandbox.exe"
execution
--experimental_windows_watchfs=<true or false>
If true, experimental Windows support for --watchfs is enabled. Otherwise --watchfsis a non-op on Windows. Make sure to also enable --watchfs.
default: "false"
--experimental_worker_allowlist=<comma-separated set of options>
If non-empty, only allow using persistent workers with the given worker key mnemonic.
default: see description
execution
host machine_resource_optimizations
--experimental_worker_as_resource=<true or false>
No-op, will be removed soon.
default: "true"
no op
--experimental_worker_cancellation=<true or false>
If enabled, Bazel may send cancellation requests to workers that support them.
default: "false"
execution
--experimental_worker_for_repo_fetching=<off, platform, virtual or auto>
The threading mode to use for repo fetching. If set to 'off', no worker thread is used, and the repo fetching is subject to restarts. Otherwise, uses a virtual worker thread.
default: "auto"
--experimental_worker_memory_limit_mb=<integer number of MBs, or "HOST_RAM", optionally followed by [-|*]<float>.>
If this limit is greater than zero, workers might be killed if the memory usage of the worker exceeds the limit. If not used together with dynamic execution and `--experimental_dynamic_ignore_local_signals=9`, this may crash your build.
default: "0"
execution
host machine_resource_optimizations
--experimental_worker_metrics_poll_interval=<An immutable length of time.>
The interval between collecting worker metrics and possibly attempting evictions. Cannot effectively be less than 1s for performance reasons.
default: "5s"
execution
host machine_resource_optimizations
--experimental_worker_multiplex_sandboxing=<true or false>
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.
default: "false"
execution
--experimental_worker_sandbox_hardening=<true or false>
If enabled, workers are run in a hardened sandbox, if the implementation allows it.
default: "false"
execution
--experimental_worker_strict_flagfiles=<true or false>
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.
default: "false"
execution
--experimental_workspace_rules_log_file=<path>
Log certain Workspace Rules events into this file as delimited WorkspaceEvent protos.
default: see description
--explain=<path>
Causes the build system to explain each executed step of the build. The explanation is written to the specified log file.
default: see description
affects outputs
--explicit_java_test_deps=<true or false>
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.
default: "false"
--extra_execution_platforms=<comma-separated list of options>
The platforms that are available as execution platforms to run actions. Platforms can be specified by exact target, or as a target pattern. These platforms will be considered before those declared in the WORKSPACE file by register_execution_platforms(). This option may only be set once; later instances will override earlier flag settings.
default: ""
execution
--extra_toolchains=<comma-separated list of options>
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().
may be used multiple times
affects outputs
changes inputs
loading and_analysis
--fat_apk_cpu=<comma-separated set of options>
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.
default: "armeabi-v7a"
affects outputs
loading and_analysis
loses incremental_state
--fat_apk_hwasan=<true or false>
Whether to create HWASAN splits.
default: "false"
affects outputs
loading and_analysis
loses incremental_state
--fdo_instrument=<string>
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. Using this option will also add: --copt=-Wno-error
default: see description
affects outputs
--fdo_optimize=<string>
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.
default: see description
affects outputs
--fdo_prefetch_hints=<build target label>
Use cache prefetch hints.
default: see description
affects outputs
--fdo_profile=<build target label>
The fdo_profile representing the profile to be used for optimization.
default: see description
affects outputs
--features=<string>
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
may be used multiple times
changes inputs
affects outputs
--fetch=<true or false>
Allows the command to fetch external dependencies. If set to false, the command will utilize any cached version of the dependency, and if none exists, the command will result in failure.
default: "true"
--fission=<set of compilation modes>
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.
default: "no"
loading and_analysis
action command_lines
affects outputs
--flag_alias=<'name=value' flag alias>
Sets a shorthand name for a Starlark flag. It takes a single key-value pair in the form "<key>=<value>" as an argument.
may be used multiple times
changes inputs
--flaky_test_attempts=<positive integer, the string "default", or test_regex@attempts. This flag may be passed more than once>
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.
may be used multiple times
execution
--force=<true or false>
Ignore existing repository if any and force fetch the repository again. Only works when --enable_bzlmod is on.
default: "false"
changes inputs
--force_pic=<true or false>
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").
default: "false"
loading and_analysis
affects outputs
--gc_thrashing_limits=<comma separated pairs of <period>:<count>>
Limits which, if reached, cause GcThrashingDetector to crash Bazel with an OOM. Each limit is specified as <period>:<count> where period is a duration and count is a positive integer. If more than --gc_thrashing_threshold percent of tenured space (old gen heap) remains occupied after <count> consecutive full GCs within <period>, an OOM is triggered. Multiple limits can be specified separated by commas.
default: "1s:2,20s:3,1m:5"
host machine_resource_optimizations
--gc_thrashing_threshold=<integer in 0-100 range>
The percent of tenured space occupied (0-100) above which GcThrashingDetector considers memory pressure events against its limits (-- gc_thrashing_limits). If set to 100, GcThrashingDetector is disabled.
default: "100"
host machine_resource_optimizations
--generate_json_trace_profile=<tri-state (auto, yes, no)>
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.
default: "auto"
bazel monitoring
--genrule_strategy=<comma-separated list of options>
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.
default: ""
execution
--google_auth_scopes=<comma-separated list of options>
A comma-separated list of Google Cloud authentication scopes.
default: "https://www.googleapis.com/auth/cloud-platform"
--google_credentials=<string>
Specifies the file to get authentication credentials from. See https://cloud.google.com/docs/authentication for details.
default: see description
--google_default_credentials=<true or false>
Whether to use 'Google Application Default Credentials' for authentication. See https://cloud.google.com/docs/authentication for details. Disabled by default.
default: "false"
--grpc_keepalive_time=<An immutable length of time.>
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
default: see description
--grpc_keepalive_timeout=<An immutable length of time.>
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.
default: "20s"
--grte_top=<label>
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.
default: see description
action command_lines
affects outputs
--heap_dump_on_oom=<true or false>
Whether to manually output a heap dump if an OOM is thrown (including manual OOMs due to reaching --gc_thrashing_limits). The dump will be written to <output_base>/<invocation_id>.heapdump.hprof. This option effectively replaces -XX:+HeapDumpOnOutOfMemoryError, which has no effect for manual OOMs.
default: "false"
bazel monitoring
--heuristically_drop_nodes=<true or false>
If true, Blaze will remove FileState and DirectoryListingState nodes after related File and DirectoryListing node is done to save memory. We expect that it is less likely that these nodes will be needed again. If so, the program will re-evaluate them.
default: "false"
loses incremental_state
--high_priority_workers=<string>
No-op, will be removed soon.
may be used multiple times
execution
--host_action_env=<'name=value' assignment with an optional value part>
Specifies the set of environment variables available to actions with execution configurations. Variables can be either specified by name, in which case the value will be taken from the invocation environment, or by the name=value pair which sets the value independent of the invocation environment. This option can be used multiple times; for options given for the same variable, the latest wins, options for different variables accumulate.
may be used multiple times
action command_lines
--host_compilation_mode=<fastbuild, dbg or opt>
Specify the mode the tools used during the build will be built in. Values: 'fastbuild', 'dbg', 'opt'.
default: "opt"
affects outputs
action command_lines
--host_compiler=<string>
The C++ compiler to use for host compilation. It is ignored if -- host_crosstool_top is not set.
default: see description
loading and_analysis
execution
--host_conlyopt=<string>
Additional option to pass to the C compiler when compiling C (but not C++) source files in the exec configurations.
may be used multiple times
action command_lines
affects outputs
--host_copt=<string>
Additional options to pass to the C compiler for tools built in the exec configurations.
may be used multiple times
action command_lines
affects outputs
--host_cpu=<string>
The host CPU.
default: ""
changes inputs
affects outputs
--host_crosstool_top=<build target label>
By default, the --crosstool_top and --compiler options are also used for the exec configuration. If this flag is provided, Bazel uses the default libc and compiler for the given crosstool_top.
default: see description
loading and_analysis
changes inputs
affects outputs
--host_cxxopt=<string>
Additional options to pass to C++ compiler for tools built in the exec configurations.
may be used multiple times
action command_lines
affects outputs
--host_features=<string>
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.
may be used multiple times
changes inputs
affects outputs
--host_force_python=<PY2 or PY3>
Overrides the Python version for the exec configuration. Can be "PY2" or "PY3".
default: see description
loading and_analysis
affects outputs
--host_grte_top=<label>
If specified, this setting overrides the libc top-level directory (-- grte_top) for the exec configuration.
default: see description
action command_lines
affects outputs
--host_java_launcher=<build target label>
The Java launcher used by tools that are executed during a build.
default: see description
--host_javacopt=<string>
Additional options to pass to javac when building tools that are executed during a build.
may be used multiple times
--host_jvmopt=<string>
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.
may be used multiple times
--host_linkopt=<string>
Additional option to pass to linker when linking tools in the exec configurations.
may be used multiple times
action command_lines
affects outputs
--host_macos_minimum_os=<dotted version (for example '2.3' or '3.3alpha2.4')>
Minimum compatible macOS version for host targets. If unspecified, uses 'macos_sdk_version'.
default: see description
loses incremental_state
--host_per_file_copt=<comma-separated list of regex expressions with prefix '-' specifying excluded paths followed by an @ and a comma separated list of options>
Additional options to selectively pass to the C/C++ compiler when compiling certain files in the exec configurations. This option can be passed multiple times. Syntax: regex_filter@option_1,option_2,...,option_n. Where regex_filter stands for a list of include and exclude regular expression patterns (Also see --instrumentation_filter). option_1 to option_n stand for arbitrary command line options. If an option contains a comma it has to be quoted with a backslash. Options can contain @. Only the first @ is used to split the string. Example: --host_per_file_copt=//foo/.*\.cc,-//foo/bar\. cc@-O0 adds the -O0 command line option to the gcc command line of all cc files in //foo/ except bar.cc.
may be used multiple times
action command_lines
affects outputs
--host_platform=<build target label>
The label of a platform rule that describes the host system.
default: "@bazel_tools//tools:host_platform"
affects outputs
changes inputs
loading and_analysis
--host_swiftcopt=<string>
Additional options to pass to swiftc for exec tools.
may be used multiple times
action command_lines
affects outputs
--http_connector_attempts=<integer>
The maximum number of attempts for http downloads.
default: "8"
bazel internal_configuration
--http_connector_retry_max_timeout=<An immutable length of time.>
The maximum timeout for http download retries. With a value of 0, no timeout maximum is defined.
default: "0s"
bazel internal_configuration
--http_max_parallel_downloads=<integer>
The maximum number parallel http downloads.
default: "8"
bazel internal_configuration
--http_timeout_scaling=<double>
Scale all timeouts related to http downloads by the given factor
default: "1.0"
bazel internal_configuration
--ignore_dev_dependency=<true or false>
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.
default: "false"
loading and_analysis
--ignore_unsupported_sandboxing=<true or false>
Do not print a warning when sandboxed execution is not supported on this system.
default: "false"
terminal output
--incompatible_allow_tags_propagation=<true or false>
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.
default: "true"
build file_semantics
experimental
--incompatible_always_check_depset_elements=<true or false>
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.
default: "true"
build file_semantics
incompatible change
--incompatible_always_include_files_in_data=<true or false>
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).
default: "true"
affects outputs
incompatible change
--incompatible_auto_exec_groups=<true or false>
When enabled, an exec groups is automatically created for each toolchain used by a rule. For this to work rule needs to specify `toolchain` parameter on its actions. For more information, see https://github. com/bazelbuild/bazel/issues/17134.
default: "false"
affects outputs
incompatible change
--incompatible_autoload_externally=<comma-separated set of options>
A comma-separated list of rules (or other symbols) that were previously part of Bazel and which are now to be retrieved from their respective external repositories. This flag is intended to be used to facilitate migration of rules out of Bazel. See also https://github. com/bazelbuild/bazel/issues/23043. A symbol that is autoloaded within a file behaves as if its built-into- Bazel definition were replaced by its canonical new definition in an external repository. For a BUILD file, this essentially means implicitly adding a load() statement. For a .bzl file, it's either a load() statement or a change to a field of the `native` object, depending on whether the autoloaded symbol is a rule. Bazel maintains a hardcoded list of all symbols that may be autoloaded; only those symbols may appear in this flag. For each symbol, Bazel knows the new definition location in an external repository, as well as a set of special-cased repositories that must not autoload it to avoid creating cycles. A list item of "+foo" in this flag causes symbol foo to be autoloaded, except in foo's exempt repositories, within which the Bazel-defined version of foo is still available. A list item of "foo" triggers autoloading as above, but the Bazel-defined version of foo is not made available to the excluded repositories. This ensures that foo's external repository does not depend on the old Bazel implementation of foo A list item of "-foo" does not trigger any autoloading, but makes the Bazel- defined version of foo inaccessible throughout the workspace. This is used to validate that the workspace is ready for foo's definition to be deleted from Bazel. If a symbol is not named in this flag then it continues to work as normal -- no autoloading is done, nor is the Bazel-defined version suppressed. For configuration see https://github. com/bazelbuild/bazel/blob/master/src/main/java/com/google/devtools/build/lib/packages/AutoloadSymbols. java As a shortcut also whole repository may be used, for example +@rules_python will autoload all Python rules.
default: ""
loses incremental_state
build file_semantics
incompatible change
--incompatible_check_sharding_support=<true or false>
If true, Bazel will fail a sharded test if the test runner does not indicate that it supports sharding by touching the file at the path in TEST_SHARD_STATUS_FILE. If false, a test runner that does not support sharding will lead to all tests running in each shard.
default: "true"
incompatible change
--incompatible_check_testonly_for_output_files=<true or false>
If enabled, check testonly for prerequisite targets that are output files by looking up the testonly of the generating rule. This matches visibility checking.
default: "false"
build file_semantics
incompatible change
--incompatible_check_visibility_for_toolchains=<true or false>
If enabled, visibility checking also applies to toolchain implementations.
default: "false"
build file_semantics
incompatible change
--incompatible_config_setting_private_default_visibility=<true or false>
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.
default: "false"
loading and_analysis
incompatible change
--incompatible_default_to_explicit_init_py=<true or false>
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.
default: "false"
affects outputs
incompatible change
--incompatible_depset_for_java_output_source_jars=<true or false>
When true, Bazel no longer returns a list from java_info.java_output[0]. source_jars but returns a depset instead.
default: "true"
loading and_analysis
incompatible change
--incompatible_depset_for_libraries_to_link_getter=<true or false>
When true, Bazel no longer returns a list from linking_context. libraries_to_link but returns a depset instead.
default: "true"
loading and_analysis
incompatible change
--incompatible_disable_native_android_rules=<true or false>
If enabled, direct usage of the native Android rules is disabled. Please use the Starlark Android rules from https://github. com/bazelbuild/rules_android
default: "false"
eagerness to_exit
incompatible change
--incompatible_disable_native_apple_binary_rule=<true or false>
No-op. Kept here for backwards compatibility.
default: "false"
eagerness to_exit
incompatible change
--incompatible_disable_native_repo_rules=<true or false>
If false, native repo rules can be used in WORKSPACE; otherwise, Starlark repo rules must be used instead. Native repo rules include local_repository, new_local_repository, local_config_platform, android_sdk_repository, and android_ndk_repository.
default: "false"
bazel internal_configuration
--incompatible_disable_non_executable_java_binary=<true or false>
If true, java_binary is always executable. create_executable attribute is removed.
default: "false"
loading and_analysis
incompatible change
--incompatible_disable_objc_library_transition=<true or false>
Disable objc_library's custom transition and inherit from the top level target instead
default: "true"
build file_semantics
incompatible change
--incompatible_disable_starlark_host_transitions=<true or false>
If set to true, rule attributes cannot set 'cfg = "host"'. Rules should set 'cfg = "exec"' instead.
default: "false"
loading and_analysis
incompatible change
--incompatible_disable_target_provider_fields=<true or false>
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.
default: "false"
build file_semantics
incompatible change
--incompatible_disallow_empty_glob=<true or false>
If set to true, the default value of the `allow_empty` argument of glob() is False.
default: "false"
build file_semantics
incompatible change
--incompatible_disallow_legacy_py_provider=<true or false>
No-op, will be removed soon.
default: "true"
loading and_analysis
incompatible change
--incompatible_disallow_sdk_frameworks_attributes=<true or false>
If true, disallow sdk_frameworks and weak_sdk_frameworks attributes in objc_library andobjc_import.
default: "false"
build file_semantics
incompatible change
--incompatible_disallow_struct_provider_syntax=<true or false>
If set to true, rule implementation functions may not return a struct. They must instead return a list of provider instances.
default: "false"
build file_semantics
incompatible change
--incompatible_disallow_symlink_file_to_dir=<true or false>
No-op.
default: "true"
loading and_analysis
incompatible change
--incompatible_disallow_unsound_directory_outputs=<true or false>
If set, it is an error for an action to materialize an output file as a directory. Does not affect source directories. See https://github. com/bazelbuild/bazel/issues/18646.
default: "true"
bazel internal_configuration
incompatible change
--incompatible_do_not_split_linking_cmdline=<true or false>
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.
default: "true"
loading and_analysis
incompatible change
--incompatible_dont_enable_host_nonhost_crosstool_features=<true or false>
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).
default: "true"
loading and_analysis
incompatible change
--incompatible_dont_use_javasourceinfoprovider=<true or false>
No-op
default: "false"
incompatible change
--incompatible_enable_android_toolchain_resolution=<true or false>
Use toolchain resolution to select the Android SDK for android rules (Starlark and native)
default: "true"
loading and_analysis
incompatible change
--incompatible_enable_apple_toolchain_resolution=<true or false>
Use toolchain resolution to select the Apple SDK for apple rules (Starlark and native)
default: "false"
loading and_analysis
incompatible change
--incompatible_enable_deprecated_label_apis=<true or false>
If enabled, certain deprecated APIs (native.repository_name, Label. workspace_name, Label.relative) can be used.
default: "true"
loading and_analysis
--incompatible_enable_proto_toolchain_resolution=<true or false>
If true, proto lang rules define toolchains from rules_proto, rules_java, rules_cc repositories.
default: "false"
loading and_analysis
incompatible change
--incompatible_enforce_config_setting_visibility=<true or false>
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.
default: "true"
loading and_analysis
incompatible change
--incompatible_exclusive_test_sandboxed=<true or false>
If true, exclusive tests will run with sandboxed strategy. Add 'local' tag to force an exclusive test run locally
default: "true"
incompatible change
--incompatible_existing_rules_immutable_view=<true or false>
If set to true, native.existing_rule and native.existing_rules return lightweight immutable view objects instead of mutable dicts.
default: "true"
build file_semantics
loading and_analysis
incompatible change
--incompatible_fail_on_unknown_attributes=<true or false>
If enabled, targets that have unknown attributes set to None fail.
default: "true"
loading and_analysis
incompatible change
--incompatible_fix_package_group_reporoot_syntax=<true or false>
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.
default: "true"
build file_semantics
incompatible change
--incompatible_java_common_parameters=<true or false>
If set to true, the output_jar, and host_javabase parameters in pack_sources and host_javabase in compile will all be removed.
default: "true"
build file_semantics
incompatible change
--incompatible_legacy_local_fallback=<true or false>
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.
default: "false"
execution
incompatible change
--incompatible_make_thinlto_command_lines_standalone=<true or false>
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).
default: "true"
loading and_analysis
incompatible change
--incompatible_merge_fixed_and_default_shell_env=<true or false>
If enabled, actions registered with ctx.actions.run and ctx.actions. run_shell with both 'env' and 'use_default_shell_env = True' specified will use an environment obtained from the default shell environment by overriding with the values passed in to 'env'. If disabled, the value of 'env' is completely ignored in this case.
default: "true"
loading and_analysis
incompatible change
--incompatible_merge_genfiles_directory=<true or false>
If true, the genfiles directory is folded into the bin directory.
default: "true"
affects outputs
incompatible change
--incompatible_modify_execution_info_additive=<true or false>
When enabled, passing multiple --modify_execution_info flags is additive. When disabled, only the last flag is taken into account.
default: "false"
execution
affects outputs
loading and_analysis
incompatible change
--incompatible_new_actions_api=<true or false>
If set to true, the API to create actions is only available on `ctx. actions`, not on `ctx`.
default: "true"
build file_semantics
incompatible change
--incompatible_no_attr_license=<true or false>
If set to true, disables the function `attr.license`.
default: "true"
build file_semantics
incompatible change
--incompatible_no_implicit_file_export=<true or false>
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
default: "false"
build file_semantics
incompatible change
--incompatible_no_implicit_watch_label=<true or false>
If true, then methods on <code>repository_ctx</code> that are passed a Label will no longer automatically watch the file under that label for changes even if <code>watch = "no"</code>, and <code>repository_ctx. path</code> no longer causes the returned path to be watched. Use <code>repository_ctx.watch</code> instead.
default: "false"
loading and_analysis
incompatible change
--incompatible_no_rule_outputs_param=<true or false>
If set to true, disables the `outputs` parameter of the `rule()` Starlark function.
default: "false"
build file_semantics
incompatible change
--incompatible_objc_alwayslink_by_default=<true or false>
If true, make the default value true for alwayslink attributes in objc_library and objc_import.
default: "false"
build file_semantics
incompatible change
--incompatible_objc_provider_remove_linking_info=<true or false>
If set to true, the ObjcProvider's APIs for linking info will be removed.
default: "false"
build file_semantics
incompatible change
--incompatible_package_group_has_public_syntax=<true or false>
In package_group's `packages` attribute, allows writing "public" or "private" to refer to all packages or no packages respectively.
default: "true"
build file_semantics
incompatible change
--incompatible_py2_outputs_are_suffixed=<true or false>
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`.
default: "true"
affects outputs
incompatible change
--incompatible_py3_is_default=<true or false>
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`.
default: "true"
loading and_analysis
affects outputs
incompatible change
--incompatible_python_disable_py2=<true or false>
If true, using Python 2 settings will cause an error. This includes python_version=PY2, srcs_version=PY2, and srcs_version=PY2ONLY. See https: //github.com/bazelbuild/bazel/issues/15684 for more information.
default: "true"
loading and_analysis
incompatible change
--incompatible_python_disallow_native_rules=<true or false>
When true, an error occurs when using the builtin py_* rules; instead the rule_python rules should be used. See https://github. com/bazelbuild/bazel/issues/17773 for more information and migration instructions.
default: "false"
loading and_analysis
incompatible change
--incompatible_remote_build_event_upload_respect_no_cache=<true or false>
Deprecated. No-op. Use --remote_build_event_upload=minimal instead.
default: "false"
--incompatible_remote_dangling_symlinks=<true or false>
If set to true, symlinks uploaded to a remote or disk cache are allowed to dangle.
default: "true"
execution
incompatible change
--incompatible_remote_downloader_send_all_headers=<true or false>
Whether to send all values of a multi-valued header to the remote downloader instead of just the first.
default: "true"
incompatible change
--incompatible_remote_output_paths_relative_to_input_root=<true or false>
If set to true, output paths are relative to input root instead of working directory.
default: "false"
incompatible change
--incompatible_remote_results_ignore_disk=<true or false>
No-op
default: "true"
incompatible change
--incompatible_remote_symlinks=<true or false>
If set to true, Bazel will always upload symlinks as such to a remote or disk cache. Otherwise, non-dangling relative symlinks (and only those) will be uploaded as the file or directory they point to.
default: "true"
execution
incompatible change
--incompatible_remote_use_new_exit_code_for_lost_inputs=<true or false>
If set to true, Bazel will use new exit code 39 instead of 34 if remote cacheerrors, including cache evictions, cause the build to fail.
default: "true"
incompatible change
--incompatible_remove_legacy_whole_archive=<true or false>
If true, Bazel will not link library dependencies as whole archive by default (see https://github.com/bazelbuild/bazel/issues/7362 for migration instructions).
default: "true"
loading and_analysis
incompatible change
--incompatible_require_ctx_in_configure_features=<true or false>
If true, Bazel will require 'ctx' parameter in to cc_common. configure_features (see https://github.com/bazelbuild/bazel/issues/7793 for more information).
default: "true"
loading and_analysis
incompatible change
--incompatible_require_linker_input_cc_api=<true or false>
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.
default: "true"
build file_semantics
loading and_analysis
incompatible change
--incompatible_run_shell_command_string=<true or false>
If set to true, the command parameter of actions.run_shell will only accept string
default: "true"
build file_semantics
incompatible change
--incompatible_sandbox_hermetic_tmp=<true or false>
If set to true, each Linux sandbox will have its own dedicated empty directory mounted as /tmp rather than sharing /tmp with the host filesystem. Use --sandbox_add_mount_pair=/tmp to keep seeing the host's /tmp in all sandboxes.
default: "true"
execution
--incompatible_stop_exporting_language_modules=<true or false>
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.
default: "false"
loading and_analysis
incompatible change
--incompatible_strict_action_env=<true or false>
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.
default: "false"
loading and_analysis
incompatible change
--incompatible_struct_has_no_methods=<true or false>
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.
default: "false"
build file_semantics
incompatible change
--incompatible_top_level_aspects_require_providers=<true or false>
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.
default: "false"
loading and_analysis
incompatible change
--incompatible_unambiguous_label_stringification=<true or false>
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.
default: "true"
loading and_analysis
incompatible change
--incompatible_use_cc_configure_from_rules_cc=<true or false>
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.
default: "false"
loading and_analysis
incompatible change
--incompatible_use_host_features=<true or false>
If true, use --features only for the target configuration and -- host_features for the exec configuration.
default: "true"
changes inputs
affects outputs
incompatible change
--incompatible_use_plus_in_repo_names=<true or false>
If true, uses the plus sign (+) as the separator in canonical repo names, instead of the tilde (~). This is to address severe performance issues on Windows; see https://github.com/bazelbuild/bazel/issues/22865 for more information.
default: "false"
loading and_analysis
--incompatible_use_python_toolchains=<true or false>
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.
default: "true"
loading and_analysis
incompatible change
--incompatible_validate_top_level_header_inclusions=<true or false>
If true, Bazel will also validate top level directory header inclusions (see https://github.com/bazelbuild/bazel/issues/10047 for more information).
default: "true"
loading and_analysis
incompatible change
--incompatible_visibility_private_attributes_at_definition=<true or false>
If set to true, the visibility of private rule attributes is checked with respect to the rule definition, falling back to rule usage if not visible.
default: "true"
build file_semantics
incompatible change
--incremental_dexing=<true or false>
Does most of the work for dexing separately for each Jar file.
default: "true"
affects outputs
loading and_analysis
loses incremental_state
--instrument_test_targets=<true or false>
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.
default: "false"
affects outputs
--instrumentation_filter=<comma-separated list of regex expressions with prefix '-' specifying excluded paths>
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.
default: "-/javatests[/:],-/test/java[/:]"
affects outputs
--interface_shared_objects=<true or false>
Use interface shared objects if supported by the toolchain. All ELF toolchains currently support this setting.
default: "true"
loading and_analysis
affects outputs
affects outputs
--internal_spawn_scheduler=<true or false>
Placeholder option so that we can tell in Blaze whether the spawn scheduler was enabled.
default: "false"
execution
host machine_resource_optimizations
--invocation_id=<UUID>
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.
default: ""
bazel monitoring
bazel internal_configuration
--ios_memleaks=<true or false>
Enable checking for memory leaks in ios_test targets.
default: "false"
action command_lines
--ios_minimum_os=<dotted version (for example '2.3' or '3.3alpha2.4')>
Minimum compatible iOS version for target simulators and devices. If unspecified, uses 'ios_sdk_version'.
default: see description
loses incremental_state
--ios_multi_cpus=<comma-separated list of options>
Comma-separated list of architectures to build an ios_application with. The result is a universal binary containing all specified architectures.
may be used multiple times
loses incremental_state
loading and_analysis
--ios_sdk_version=<dotted version (for example '2.3' or '3.3alpha2.4')>
Specifies the version of the iOS SDK to use to build iOS applications. If unspecified, uses default iOS SDK version from 'xcode_version'.
default: see description
loses incremental_state
--ios_signing_cert_name=<string>
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).
default: see description
action command_lines
--ios_simulator_device=<string>
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.
default: see description
test runner
--ios_simulator_version=<dotted version (for example '2.3' or '3.3alpha2.4')>
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.
default: see description
test runner
--j2objc_translation_flags=<comma-separated list of options>
Additional options to pass to the J2ObjC tool.
may be used multiple times
--java_debug
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. Expands to: --test_arg=--wrapper_script_flag=--debug -- test_output=streamed --test_strategy=exclusive --test_timeout=9999 -- nocache_test_results
--java_deps=<true or false>
Generate dependency information (for now, compile-time classpath) per Java target.
default: "true"
--java_header_compilation=<true or false>
Compile ijars directly from source.
default: "true"
--java_language_version=<string>
The Java language version
default: ""
--java_launcher=<build target label>
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.
default: see description
--java_runtime_version=<string>
The Java runtime version
default: "local_jdk"
--javacopt=<string>
Additional options to pass to javac.
may be used multiple times
--jobs=<integer, or a keyword ("auto", "HOST_CPUS", "HOST_RAM"), optionally followed by an operation ([-|*]<float>) eg. "auto", "HOST_CPUS*.5">
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.
default: "auto"
host machine_resource_optimizations
execution
--jvmopt=<string>
Additional options to pass to the Java VM. These options will get added to the VM startup options of each java_binary target.
may be used multiple times
--keep_going=<true or false>
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.
default: "false"
eagerness to_exit
--keep_state_after_build=<true or false>
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.
default: "true"
loses incremental_state
--legacy_external_runfiles=<true or false>
If true, build runfiles symlink forests for external repositories under . runfiles/wsname/external/repo (in addition to .runfiles/repo).
default: "true"
affects outputs
--legacy_important_outputs=<true or false>
Use this to suppress generation of the legacy important_outputs field in the TargetComplete event. important_outputs are required for Bazel to ResultStore integration.
default: "true"
affects outputs
--legacy_main_dex_list_generator=<build target label>
Specifies a binary to use to generate the list of classes that must be in the main dex when compiling legacy multidex.
default: see description
--legacy_whole_archive=<true or false>
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.
default: "true"
action command_lines
affects outputs
deprecated
--linkopt=<string>
Additional option to pass to gcc when linking.
may be used multiple times
action command_lines
affects outputs
--loading_phase_threads=<integer, or a keyword ("auto", "HOST_CPUS", "HOST_RAM"), optionally followed by an operation ([-|*]<float>) eg. "auto", "HOST_CPUS*.5">
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.
default: "auto"
bazel internal_configuration
--local_cpu_resources=<integer, or "HOST_CPUS", optionally followed by [-|*]<float>.>
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.
default: "HOST_CPUS"
host machine_resource_optimizations
--local_extra_resources=<named float, 'name=value'>
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.
may be used multiple times
host machine_resource_optimizations
--local_ram_resources=<integer number of MBs, or "HOST_RAM", optionally followed by [-|*]<float>.>
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.
default: "HOST_RAM*.67"
host machine_resource_optimizations
--local_resources=<named double, 'name=value', where value is an integer, or a keyword ("auto", "HOST_CPUS", "HOST_RAM"), optionally followed by an operation ([-|*]<float>) eg. "auto", "HOST_CPUS*.5">
Set the number of resources available to Bazel. Takes in an assignment to a float or HOST_RAM/HOST_CPUS, optionally followed by [-|*]<float> (eg. memory=HOST_RAM*.5 to use half the available RAM). Can be used multiple times to specify multiple types of resources. Bazel will limit concurrently running actions based on the available resources and the resources required. Tests can declare the amount of resources they need by using a tag of the "resources:<resource name>:<amount>" format. Overrides resources specified by --local_{cpu|ram|extra}_resources.
may be used multiple times
host machine_resource_optimizations
--local_termination_grace_seconds=<integer>
Time to wait between terminating a local process due to timeout and forcefully shutting it down.
default: "15"
--local_test_jobs=<integer, or a keyword ("auto", "HOST_CPUS", "HOST_RAM"), optionally followed by an operation ([-|*]<float>) eg. "auto", "HOST_CPUS*.5">
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.
default: "auto"
execution
--lockfile_mode=<off, update, refresh or error>
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, `refresh` to additionally refresh mutable information (yanked versions and previously missing modules) from remote registries from time to time, `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.
default: "update"
loading and_analysis
--logging=<0 <= an integer <= 6>
The logging level.
default: "3"
affects outputs
--ltobackendopt=<string>
Additional option to pass to the LTO backend step (under -- features=thin_lto).
may be used multiple times
action command_lines
affects outputs
--ltoindexopt=<string>
Additional option to pass to the LTO indexing step (under -- features=thin_lto).
may be used multiple times
action command_lines
affects outputs
--macos_cpus=<comma-separated list of options>
Comma-separated list of architectures for which to build Apple macOS binaries.
may be used multiple times
loses incremental_state
loading and_analysis
--macos_minimum_os=<dotted version (for example '2.3' or '3.3alpha2.4')>
Minimum compatible macOS version for targets. If unspecified, uses 'macos_sdk_version'.
default: see description
loses incremental_state
--macos_sdk_version=<dotted version (for example '2.3' or '3.3alpha2.4')>
Specifies the version of the macOS SDK to use to build macOS applications. If unspecified, uses default macOS SDK version from 'xcode_version'.
default: see description
loses incremental_state
--materialize_param_files=<true or false>
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.
default: "false"
execution
--max_computation_steps=<long integer>
The maximum number of Starlark computation steps that may be executed by a BUILD file (zero means no limit).
default: "0"
build file_semantics
--max_config_changes_to_show=<integer>
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.
default: "3"
terminal output
--max_test_output_bytes=<integer>
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.
default: "-1"
test runner
terminal output
execution
--memory_profile=<path>
If set, write memory usage data to the specified file at phase ends and stable heap to master log at end of build.
default: see description
bazel monitoring
--memory_profile_stable_heap_parameters=<integers, separated by a comma expected in pairs>
Tune memory profile's computation of stable heap at end of build. Should be and even number of integers separated by commas. In each pair the first integer is the number of GCs to perform. The second integer in each pair is the number of seconds to wait between GCs. Ex: 2,4,4,0 would 2 GCs with a 4sec pause, followed by 4 GCs with zero second pause
default: "1,0"
bazel monitoring
--memprof_profile=<build target label>
Use memprof profile.
default: see description
affects outputs
--minimum_os_version=<string>
The minimum OS version which your compilation targets.
default: see description
loading and_analysis
affects outputs
--modify_execution_info=<regex=[+-]key,regex=[+-]key,...>
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.
may be used multiple times
execution
affects outputs
loading and_analysis
--nested_set_depth_limit=<integer>
The maximum depth of the graph internal to a depset (also known as NestedSet), above which the depset() constructor will fail.
default: "3500"
loading and_analysis
--objc_debug_with_GLIBCXX=<true or false>
If set, and compilation mode is set to 'dbg', define GLIBCXX_DEBUG, GLIBCXX_DEBUG_PEDANTIC and GLIBCPP_CONCEPT_CHECKS.
default: "false"
action command_lines
--objc_enable_binary_stripping=<true or false>
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.
default: "false"
action command_lines
--objc_generate_linkmap=<true or false>
Specifies whether to generate a linkmap file.
default: "false"
affects outputs
--objc_use_dotd_pruning=<true or false>
If set, .d files emitted by clang will be used to prune the set of inputs passed into objc compiles.
default: "true"
changes inputs
loading and_analysis
--objccopt=<string>
Additional options to pass to gcc when compiling Objective-C/C++ source files.
may be used multiple times
action command_lines
--one_version_enforcement_on_java_tests=<true or false>
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.
default: "true"
loading and_analysis
--optimizing_dexer=<build target label>
Specifies a binary to use to do dexing without sharding.
default: see description
--output_filter=<valid Java regular expression>
Only shows warnings and action outputs for rules with a name matching the provided regular expression.
default: see description
affects outputs
--output_groups=<comma-separated list of options>
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.
may be used multiple times
execution
affects outputs
--override_module=<equals-separated mapping of module name to path>
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`. If the given path is empty, then remove any previous overrides.
may be used multiple times
--override_repository=<equals-separated mapping of repository name to path>
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`. If the given path is empty, then remove any previous overrides.
may be used multiple times
--package_path=<colon-separated list of options>
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'.
default: "%workspace%"
--per_file_copt=<comma-separated list of regex expressions with prefix '-' specifying excluded paths followed by an @ and a comma separated list of options>
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.
may be used multiple times
action command_lines
affects outputs
--per_file_ltobackendopt=<comma-separated list of regex expressions with prefix '-' specifying excluded paths followed by an @ and a comma separated list of options>
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.
may be used multiple times
action command_lines
affects outputs
--persistent_android_dex_desugar
Enable persistent Android dex and desugar actions by using workers. Expands to: --internal_persistent_android_dex_desugar -- strategy=Desugar=worker --strategy=DexBuilder=worker
host machine_resource_optimizations
execution
--persistent_android_resource_processor
Enable persistent Android resource processor by using workers. Expands to: --internal_persistent_busybox_tools -- strategy=AaptPackage=worker --strategy=AndroidResourceParser=worker -- strategy=AndroidResourceValidator=worker -- strategy=AndroidResourceCompiler=worker --strategy=RClassGenerator=worker --strategy=AndroidResourceLink=worker --strategy=AndroidAapt2=worker -- strategy=AndroidAssetMerger=worker -- strategy=AndroidResourceMerger=worker -- strategy=AndroidCompiledResourceMerger=worker -- strategy=ManifestMerger=worker --strategy=AndroidManifestMerger=worker -- strategy=Aapt2Optimize=worker --strategy=AARGenerator=worker -- strategy=ProcessDatabinding=worker -- strategy=GenerateDataBindingBaseClasses=worker
host machine_resource_optimizations
execution
--persistent_multiplex_android_dex_desugar
Enable persistent multiplexed Android dex and desugar actions by using workers. Expands to: --persistent_android_dex_desugar -- internal_persistent_multiplex_android_dex_desugar
host machine_resource_optimizations
execution
--persistent_multiplex_android_resource_processor
Enable persistent multiplexed Android resource processor by using workers. 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
host machine_resource_optimizations
execution
--persistent_multiplex_android_tools
Enable persistent and multiplexed Android tools (dexing, desugaring, resource processing). Expands to: --internal_persistent_multiplex_busybox_tools -- persistent_multiplex_android_resource_processor -- persistent_multiplex_android_dex_desugar
host machine_resource_optimizations
execution
--platform_mappings=<relative path>
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).
default: ""
affects outputs
changes inputs
loading and_analysis
--platform_suffix=<string>
Specifies a suffix to be added to the configuration directory.
default: see description
loses incremental_state
affects outputs
loading and_analysis
--platforms=<build target label>
The labels of the platform rules describing the target platforms for the current command.
default: ""
affects outputs
changes inputs
loading and_analysis
--plugin=<build target label>
Plugins to use in the build. Currently works with java_plugin.
may be used multiple times
--print_relative_test_log_paths=<true or false>
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.
default: "false"
affects outputs
--process_headers_in_dependencies=<true or false>
When building a target //a:a, process headers in all targets that //a:a depends on (if header processing is enabled for the toolchain).
default: "false"
execution
--profile=<path>
If set, profile Bazel and write data to the specified file. Use bazel analyze-profile to analyze the profile.
default: see description
bazel monitoring
--progress_in_terminal_title=<true or false>
Show the command progress in the terminal title. Useful to see what bazel is doing when having multiple terminal tabs.
default: "false"
--progress_report_interval=<integer in 0-3600 range>
The number of seconds to wait between reports on still running jobs. The default value 0 means the first report will be printed after 10 seconds, then 30 seconds and after that progress is reported once every minute. When --curses is enabled, progress is reported every second.
default: "0"
affects outputs
--proguard_top=<build target label>
Specifies which version of ProGuard to use for code removal when building a Java binary.
default: see description
--propeller_optimize=<build target label>
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
default: see description
action command_lines
affects outputs
--propeller_optimize_absolute_cc_profile=<string>
Absolute path name of cc_profile file for Propeller Optimized builds.
default: see description
affects outputs
--propeller_optimize_absolute_ld_profile=<string>
Absolute path name of ld_profile file for Propeller Optimized builds.
default: see description
affects outputs
--proto_compiler=<build target label>
The label of the proto-compiler.
default: "@bazel_tools//tools/proto:protoc"
affects outputs
loading and_analysis
--proto_toolchain_for_cc=<build target label>
Label of proto_lang_toolchain() which describes how to compile C++ protos
default: "@bazel_tools//tools/proto:cc_toolchain"
affects outputs
loading and_analysis
--proto_toolchain_for_j2objc=<build target label>
Label of proto_lang_toolchain() which describes how to compile j2objc protos
default: "@bazel_tools//tools/j2objc:j2objc_proto_toolchain"
affects outputs
loading and_analysis
--proto_toolchain_for_java=<build target label>
Label of proto_lang_toolchain() which describes how to compile Java protos
default: "@bazel_tools//tools/proto:java_toolchain"
affects outputs
loading and_analysis
--proto_toolchain_for_javalite=<build target label>
Label of proto_lang_toolchain() which describes how to compile JavaLite protos
default: "@bazel_tools//tools/proto:javalite_toolchain"
affects outputs
loading and_analysis
--protocopt=<string>
Additional options to pass to the protobuf compiler.
may be used multiple times
affects outputs
--python_native_rules_allowlist=<build target label>
An allowlist (package_group target) to use when enforcing -- incompatible_python_disallow_native_rules.
default: see description
loading and_analysis
--python_path=<string>
The absolute path of the Python interpreter invoked to run Python targets on the target platform. Deprecated; disabled by -- incompatible_use_python_toolchains.
default: see description
loading and_analysis
affects outputs
--python_top=<build target label>
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.
default: see description
loading and_analysis
affects outputs
--python_version=<PY2 or PY3>
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.
default: see description
loading and_analysis
affects outputs
--python2_path=<string>
Deprecated, no-op. Disabled by `--incompatible_use_python_toolchains`.
default: see description
no op
deprecated
--python3_path=<string>
Deprecated, no-op. Disabled by `--incompatible_use_python_toolchains`.
default: see description
no op
deprecated
--record_full_profiler_data=<true or false>
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.
default: "false"
bazel monitoring
--registry=<string>
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.
may be used multiple times
changes inputs
--remote_accept_cached=<true or false>
Whether to accept remotely cached action results.
default: "true"
--remote_build_event_upload=<all or minimal>
If set to 'all', all local outputs referenced by BEP are uploaded to remote cache.If set to 'minimal', local outputs referenced by BEP are not uploaded to the remote cache, except for files that are important to the consumers of BEP (e.g. test logs and timing profile). bytestream:// scheme is always used for the uri of files even if they are missing from remote cache.Default to 'minimal'.
default: "minimal"
--remote_bytestream_uri_prefix=<string>
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}".
default: see description
--remote_cache=<string>
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
default: see description
--remote_cache_compression=<true or false>
If enabled, compress/decompress cache blobs with zstd when their size is at least --experimental_remote_cache_compression_threshold.
default: "false"
--remote_cache_header=<'name=value' assignment>
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.
may be used multiple times
--remote_default_exec_properties=<'name=value' assignment>
Set the default exec properties to be used as the remote execution platform if an execution platform does not already set exec_properties.
may be used multiple times
affects outputs
--remote_default_platform_properties=<string>
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.
default: ""
--remote_download_all
Downloads all remote outputs to the local machine. This flag is an alias for --remote_download_outputs=all. Expands to: --remote_download_outputs=all
affects outputs
--remote_download_minimal
Does not download any remote build outputs to the local machine. This flag is an alias for --remote_download_outputs=minimal. Expands to: --remote_download_outputs=minimal
affects outputs
--remote_download_outputs=<all, minimal or toplevel>
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.
default: "toplevel"
affects outputs
--remote_download_regex=<valid Java regular expression>
Force remote build outputs whose path matches this pattern to be downloaded, irrespective of --remote_download_outputs. Multiple patterns may be specified by repeating this flag.
may be used multiple times
affects outputs
--remote_download_symlink_template=<string>
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.
default: ""
affects outputs
--remote_download_toplevel
Only downloads remote outputs of top level targets to the local machine. This flag is an alias for --remote_download_outputs=toplevel. Expands to: --remote_download_outputs=toplevel
affects outputs
--remote_downloader_header=<'name=value' assignment>
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.
may be used multiple times
--remote_exec_header=<'name=value' assignment>
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.
may be used multiple times
--remote_execution_priority=<integer>
The relative priority of actions to be executed remotely. The semantics of the particular priority values are server-dependent.
default: "0"
--remote_executor=<string>
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.
default: see description
--remote_grpc_log=<path>
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).
default: see description
--remote_header=<'name=value' assignment>
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.
may be used multiple times
--remote_instance_name=<string>
Value to pass as instance_name in the remote execution API.
default: ""
--remote_local_fallback=<true or false>
Whether to fall back to standalone local execution strategy if remote execution fails.
default: "false"
--remote_local_fallback_strategy=<string>
No-op, deprecated. See https://github.com/bazelbuild/bazel/issues/7480 for details.
default: "local"
--remote_max_connections=<integer>
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.
default: "100"
host machine_resource_optimizations
--remote_print_execution_messages=<failure, success or all>
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.
default: "failure"
terminal output
--remote_proxy=<string>
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).
default: see description
--remote_result_cache_priority=<integer>
The relative priority of remote actions to be stored in remote cache. The semantics of the particular priority values are server-dependent.
default: "0"
--remote_retries=<integer>
The maximum number of attempts to retry a transient error. If set to 0, retries are disabled.
default: "5"
--remote_retry_max_delay=<An immutable length of time.>
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.
default: "5s"
--remote_timeout=<An immutable length of time.>
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.
default: "60s"
--remote_upload_local_results=<true or false>
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.
default: "true"
--remote_verify_downloads=<true or false>
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.
default: "true"
--repo=<string>
Only fetches the specified repository, which can be either {@apparent_repo_name} or {@@canonical_repo_name}. Only works when -- enable_bzlmod is on.
may be used multiple times
changes inputs
--repo_env=<'name=value' assignment with an optional value part>
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.
may be used multiple times
action command_lines
--repositories_without_autoloads=<comma-separated set of options>
A list of additional repositories (beyond the hardcoded ones Bazel knows about) where autoloads are not to be added. This should typically contain repositories that are transitively depended on by a repository that may be loaded automatically (and which can therefore potentially create a cycle).
default: ""
loses incremental_state
build file_semantics
incompatible change
--repository_cache=<path>
Specifies the cache location of the downloaded values obtained during the fetching of external repositories. An empty string as argument requests the cache to be disabled, otherwise the default of '<output_user_root>/cache/repos/v1' is used
default: see description
bazel internal_configuration
--repository_disable_download=<true or false>
If set, downloading using ctx.download{,_and_extract} is not allowed during repository fetching. Note that network access is not completely disabled; ctx.execute could still run an arbitrary executable that accesses the Internet.
default: "false"
bazel internal_configuration
--reuse_sandbox_directories=<true or false>
If set to true, directories used by sandboxed non-worker execution may be reused to avoid unnecessary setup costs.
default: "true"
host machine_resource_optimizations
execution
--run_under=<prefix in front of command>
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'.
default: see description
action command_lines
--run_validations=<true or false>
Whether to run validation actions as part of the build. See https://bazel. build/extending/rules#validation_actions
default: "true"
execution
affects outputs
--runs_per_test=<positive integer or test_regex@runs. This flag may be passed more than once>
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.
may be used multiple times
--runs_per_test_detects_flakes=<true or false>
If true, any shard in which at least one run/attempt passes and at least one run/attempt fails gets a FLAKY status.
default: "false"
--sandbox_add_mount_pair=<single path or a 'source:target' pair>
Add additional path pair to mount in sandbox.
may be used multiple times
execution
--sandbox_base=<string>
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.
default: ""
host machine_resource_optimizations
execution
--sandbox_block_path=<string>
For sandboxed actions, disallow access to this path.
may be used multiple times
execution
--sandbox_debug=<true or false>
Enables debugging features for the sandboxing feature. This includes two things: first, the sandbox root contents are left untouched after a build; and second, prints extra debugging information on execution. This can help developers of Bazel or Starlark rules with debugging failures due to missing input files, etc.
default: "false"
terminal output
--sandbox_default_allow_network=<true or false>
Allow network access by default for actions; this may not work with all sandboxing implementations.
default: "true"
execution
--sandbox_explicit_pseudoterminal=<true or false>
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.
default: "false"
execution
--sandbox_fake_hostname=<true or false>
Change the current hostname to 'localhost' for sandboxed actions.
default: "false"
execution
--sandbox_fake_username=<true or false>
Change the current username to 'nobody' for sandboxed actions.
default: "false"
execution
--sandbox_tmpfs_path=<absolute path>
For sandboxed actions, mount an empty, writable directory at this absolute path (if supported by the sandboxing implementation, ignored otherwise).
may be used multiple times
host machine_resource_optimizations
execution
--sandbox_writable_path=<string>
For sandboxed actions, make an existing directory writable in the sandbox (if supported by the sandboxing implementation, ignored otherwise).
may be used multiple times
execution
--save_temps=<true or false>
If set, temporary outputs from gcc will be saved. These include .s files (assembler code), .i files (preprocessed C) and .ii files (preprocessed C++).
default: "false"
affects outputs
--share_native_deps=<true or false>
If true, native libraries that contain identical functionality will be shared among different targets
default: "true"
loading and_analysis
affects outputs
--shell_executable=<path>
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.
default: see description
loading and_analysis
--show_loading_progress=<true or false>
If enabled, causes Bazel to print "Loading package:" messages.
default: "true"
--show_progress=<true or false>
Display progress messages during a build.
default: "true"
--show_progress_rate_limit=<double>
Minimum number of seconds between progress messages in the output.
default: "0.2"
--show_result=<integer>
Show the results of the build. For each target, state whether or not it was brought up-to-date, and if so, a list of output files that were built. The printed files are convenient strings for copy+pasting to the shell, to execute them. This option requires an integer argument, which is the threshold number of targets above which result information is not printed. Thus zero causes suppression of the message and MAX_INT causes printing of the result to occur always. The default is one. If nothing was built for a target its results may be omitted to keep the output under the threshold.
default: "1"
affects outputs
--show_timestamps=<true or false>
Include timestamps in messages
default: "false"
--skip_incompatible_explicit_targets=<true or false>
Skip incompatible targets that are explicitly listed on the command line. By default, building such targets results in an error but they are silently skipped when this option is enabled. See: https://bazel. build/extending/platforms#skipping-incompatible-targets
default: "false"
loading and_analysis
--skyframe_high_water_mark_full_gc_drops_per_invocation=<integer, >= 0>
Flag for advanced configuration of Bazel's internal Skyframe engine. If Bazel detects its retained heap percentage usage exceeds the threshold set by --skyframe_high_water_mark_threshold, when a full GC event occurs, it will drop unnecessary temporary Skyframe state, up to this many times per invocation. Defaults to Integer.MAX_VALUE; effectively unlimited. Zero means that full GC events will never trigger drops. If the limit is reached, Skyframe state will no longer be dropped when a full GC event occurs and that retained heap percentage threshold is exceeded.
default: "2147483647"
host machine_resource_optimizations
--skyframe_high_water_mark_minor_gc_drops_per_invocation=<integer, >= 0>
Flag for advanced configuration of Bazel's internal Skyframe engine. If Bazel detects its retained heap percentage usage exceeds the threshold set by --skyframe_high_water_mark_threshold, when a minor GC event occurs, it will drop unnecessary temporary Skyframe state, up to this many times per invocation. Defaults to Integer.MAX_VALUE; effectively unlimited. Zero means that minor GC events will never trigger drops. If the limit is reached, Skyframe state will no longer be dropped when a minor GC event occurs and that retained heap percentage threshold is exceeded.
default: "2147483647"
host machine_resource_optimizations
--skyframe_high_water_mark_threshold=<integer>
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.
default: "85"
host machine_resource_optimizations
--slim_profile=<true or false>
Slims down the size of the JSON profile by merging events if the profile gets too large.
default: "true"
bazel monitoring
--spawn_strategy=<comma-separated list of options>
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.
default: ""
execution
--stamp=<true or false>
Stamp binaries with the date, username, hostname, workspace information, etc.
default: "false"
affects outputs
--starlark_cpu_profile=<string>
Writes into the specified file a pprof profile of CPU usage by all Starlark threads.
default: ""
bazel monitoring
--strategy=<'[name=]value1[,..,valueN]' assignment>
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.
may be used multiple times
execution
--strategy_regexp=<'<RegexFilter>=value[,value]' assignment>
Override which spawn strategy should be used to execute spawn actions that have descriptions matching a certain regex_filter. See --per_file_copt for details onregex_filter matching. The last regex_filter that matches the description is used. This option overrides other flags for specifying strategy. Example: --strategy_regexp=//foo.*\.cc,-//foo/bar=local means to run actions using local strategy if their descriptions match //foo.*.cc but not //foo/bar. Example: --strategy_regexp='Compiling.*/bar=local -- strategy_regexp=Compiling=sandboxed will run 'Compiling //foo/bar/baz' with the 'local' strategy, but reversing the order would run it with 'sandboxed'.
may be used multiple times
execution
--strict_filesets=<true or false>
If this option is enabled, filesets crossing package boundaries are reported as errors.
default: "false"
build file_semantics
eagerness to_exit
--strict_proto_deps=<off, warn, error, strict or default>
Unless OFF, checks that a proto_library target explicitly declares all directly used targets as dependencies.
default: "error"
build file_semantics
eagerness to_exit
incompatible change
--strict_public_imports=<off, warn, error, strict or default>
Unless OFF, checks that a proto_library target explicitly declares all targets used in 'import public' as exported.
default: "off"
build file_semantics
eagerness to_exit
incompatible change
--strict_system_includes=<true or false>
If true, headers found through system include paths (-isystem) are also required to be declared.
default: "false"
loading and_analysis
eagerness to_exit
--strip=<always, sometimes or never>
Specifies whether to strip binaries and shared libraries (using "-Wl,-- strip-debug"). The default value of 'sometimes' means strip iff -- compilation_mode=fastbuild.
default: "sometimes"
affects outputs
--stripopt=<string>
Additional options to pass to strip when generating a '<name>.stripped' binary.
may be used multiple times
action command_lines
affects outputs
--subcommands=<true, pretty_print or false>
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).
default: "false"
terminal output
--swiftcopt=<string>
Additional options to pass to Swift compilation.
may be used multiple times
action command_lines
--symlink_prefix=<string>
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.
default: see description
affects outputs
--target_environment=<build target label>
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.
may be used multiple times
changes inputs
--target_pattern_file=<string>
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.
default: ""
changes inputs
--target_platform_fallback=<string>
This option is deprecated and has no effect.
default: ""
affects outputs
changes inputs
loading and_analysis
--test_arg=<string>
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.
may be used multiple times
--test_env=<'name=value' assignment with an optional value part>
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.
may be used multiple times
test runner
--test_filter=<string>
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.
default: see description
--test_keep_going=<true or false>
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.
default: "true"
execution
--test_lang_filters=<comma-separated list of options>
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.
default: ""
--test_output=<summary, errors, all or streamed>
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).
default: "summary"
test runner
terminal output
execution
--test_result_expiration=<integer>
This option is deprecated and has no effect.
default: "-1"
--test_runner_fail_fast=<true or false>
Forwards fail fast option to the test runner. The test runner should stop execution upon first failure.
default: "false"
--test_sharding_strategy=<explicit, disabled or forced=k where k is the number of shards to enforce>
Specify strategy for test sharding: 'explicit' to only use sharding if the 'shard_count' BUILD attribute is present. 'disabled' to never use test sharding. 'forced=k' to enforce 'k' shards for testing regardless of the 'shard_count' BUILD attribute.
default: "explicit"
--test_size_filters=<comma-separated list of values: small, medium, large or enormous>
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.
default: ""
--test_strategy=<string>
Specifies which strategy to use when running tests.
default: ""
execution
--test_summary=<short, terse, detailed, none or testcase>
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.
default: "short"
terminal output
--test_tag_filters=<comma-separated list of options>
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.
default: ""
--test_timeout=<single integer or comma-separated list of 4 integers>
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.
default: "-1"
--test_timeout_filters=<comma-separated list of values: short, moderate, long or eternal>
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.
default: ""
--test_tmpdir=<path>
Specifies the base temporary directory for 'bazel test' to use.
default: see description
--test_verbose_timeout_warnings=<true or false>
If true, print additional warnings when the actual test execution time does not match the timeout defined by the test (whether implied or explicit).
default: "false"
affects outputs
--tls_certificate=<string>
Specify a path to a TLS certificate that is trusted to sign server certificates.
default: see description
--tls_client_certificate=<string>
Specify the TLS client certificate to use; you also need to provide a client key to enable client authentication.
default: see description
--tls_client_key=<string>
Specify the TLS client key to use; you also need to provide a client certificate to enable client authentication.
default: see description
--tool_java_language_version=<string>
The Java language version used to execute the tools that are needed during a build
default: ""
--tool_java_runtime_version=<string>
The Java runtime version used to execute tools during the build
default: "remotejdk_11"
--tool_tag=<string>
A tool name to attribute this Bazel invocation to.
default: ""
affects outputs
bazel monitoring
--toolchain_resolution_debug=<comma-separated list of regex expressions with prefix '-' specifying excluded paths>
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.
default: "-.*"
terminal output
--track_incremental_state=<true or false>
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.
default: "true"
loses incremental_state
--trim_test_configuration=<true or false>
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.
default: "true"
loading and_analysis
loses incremental_state
--tvos_cpus=<comma-separated list of options>
Comma-separated list of architectures for which to build Apple tvOS binaries.
may be used multiple times
loses incremental_state
loading and_analysis
--tvos_minimum_os=<dotted version (for example '2.3' or '3.3alpha2.4')>
Minimum compatible tvOS version for target simulators and devices. If unspecified, uses 'tvos_sdk_version'.
default: see description
loses incremental_state
--tvos_sdk_version=<dotted version (for example '2.3' or '3.3alpha2.4')>
Specifies the version of the tvOS SDK to use to build tvOS applications. If unspecified, uses default tvOS SDK version from 'xcode_version'.
default: see description
loses incremental_state
--ui_actions_shown=<integer>
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.
default: "8"
terminal output
--ui_event_filters=<Convert list of comma separated event kind to list of filters>
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.
may be used multiple times
terminal output
--use_ijars=<true or false>
If enabled, this option causes Java compilation to use interface jars. This will result in faster incremental compilation, but error messages can be different.
default: "true"
--use_target_platform_for_tests=<true or false>
If true, then Bazel will use the target platform for running tests rather than the test exec group.
default: "false"
execution
--vendor_dir=<path>
Specifies the directory that should hold the external repositories in vendor mode, whether for the purpose of fetching them into it or using them while building. The path can be specified as either an absolute path or a path relative to the workspace directory.
default: see description
loading and_analysis
--verbose_explanations=<true or false>
Increases the verbosity of the explanations issued if --explain is enabled. Has no effect if --explain is not enabled.
default: "false"
affects outputs
--verbose_failures=<true or false>
If a command fails, print out the full command line.
default: "false"
terminal output
--verbose_test_summary=<true or false>
If true, print additional information (timing, number of failed runs, etc) in the test summary.
default: "true"
affects outputs
--visionos_cpus=<comma-separated list of options>
Comma-separated list of architectures for which to build Apple visionOS binaries.
may be used multiple times
loses incremental_state
loading and_analysis
--watchfs=<true or false>
On Linux/macOS: If true, bazel tries to use the operating system's file watch service for local changes instead of scanning every file for a change. On Windows: this flag currently is a non-op but can be enabled in conjunction with --experimental_windows_watchfs. On any OS: The behavior is undefined if your workspace is on a network file system, and files are edited on a remote machine.
default: "false"
--watchos_cpus=<comma-separated list of options>
Comma-separated list of architectures for which to build Apple watchOS binaries.
may be used multiple times
loses incremental_state
loading and_analysis
--watchos_minimum_os=<dotted version (for example '2.3' or '3.3alpha2.4')>
Minimum compatible watchOS version for target simulators and devices. If unspecified, uses 'watchos_sdk_version'.
default: see description
loses incremental_state
--watchos_sdk_version=<dotted version (for example '2.3' or '3.3alpha2.4')>
Specifies the version of the watchOS SDK to use to build watchOS applications. If unspecified, uses default watchOS SDK version from 'xcode_version'.
default: see description
loses incremental_state
--worker_extra_flag=<'name=value' assignment>
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.
may be used multiple times
execution
host machine_resource_optimizations
--worker_max_instances=<[name=]value, where value is an integer, or a keyword ("auto", "HOST_CPUS", "HOST_RAM"), optionally followed by an operation ([-|*]<float>) eg. "auto", "HOST_CPUS*.5">
How many instances of each kind of persistent worker may be launched if you use the 'worker' strategy. May be specified as [name=value] to give a different value per mnemonic. The limit is based on worker keys, which are differentiated based on mnemonic, but also on startup flags and environment, so there can in some cases be more workers per mnemonic than this flag specifies. Takes an integer, or a keyword ("auto", "HOST_CPUS", "HOST_RAM"), optionally followed by an operation ([-|*]<float>) eg. "auto", "HOST_CPUS*.5". 'auto' calculates a reasonable default based on machine capacity. "=value" sets a default for unspecified mnemonics.
may be used multiple times
execution
host machine_resource_optimizations
--worker_max_multiplex_instances=<[name=]value, where value is an integer, or a keyword ("auto", "HOST_CPUS", "HOST_RAM"), optionally followed by an operation ([-|*]<float>) eg. "auto", "HOST_CPUS*.5">
How many WorkRequests a multiplex worker process may receive in parallel if you use the 'worker' strategy with --worker_multiplex. May be specified as [name=value] to give a different value per mnemonic. The limit is based on worker keys, which are differentiated based on mnemonic, but also on startup flags and environment, so there can in some cases be more workers per mnemonic than this flag specifies. Takes an integer, or a keyword ("auto", "HOST_CPUS", "HOST_RAM"), optionally followed by an operation ([- |*]<float>) eg. "auto", "HOST_CPUS*.5". 'auto' calculates a reasonable default based on machine capacity. "=value" sets a default for unspecified mnemonics.
may be used multiple times
execution
host machine_resource_optimizations
--worker_multiplex=<true or false>
If enabled, workers will use multiplexing if they support it.
default: "true"
execution
host machine_resource_optimizations
--worker_quit_after_build=<true or false>
If enabled, all workers quit after a build is done.
default: "false"
execution
host machine_resource_optimizations
--worker_sandboxing=<true or false>
If enabled, workers will be executed in a sandboxed environment.
default: "false"
execution
--worker_verbose=<true or false>
If enabled, prints verbose messages when workers are started, shutdown, ...
default: "false"
--workspace_status_command=<path>
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.
default: ""
--xbinary_fdo=<build target label>
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.
default: see description
affects outputs
--xcode_version=<string>
If specified, uses Xcode of the given version for relevant build actions. If unspecified, uses the executor default version of Xcode.
default: see description
loses incremental_state
--xcode_version_config=<build target label>
The label of the xcode_config rule to be used for selecting the Xcode version in the build configuration.
default: "@bazel_tools//tools/cpp:host_xcodes"
loses incremental_state
loading and_analysis
--zip_undeclared_test_outputs=<true or false>
If true, undeclared test outputs will be archived in a zip file.
default: "true"
test runner