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.
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.
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).
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.
The location of the C++ compiler used for Android builds.
Generate AndroidX-compatible data-binding files. This is only used with
databinding v2.
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.
Selects the manifest merger to use for android_binary rules. Flag to help
thetransition to the Android manifest merger from the legacy merger.
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.
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.
Enables resource shrinking for android_binary APKs that use ProGuard.
Specifies Android SDK/platform that is used to build Android applications.
--apple_bitcode=<'mode' or 'platform=mode', where 'mode' is none, embedded_markers or embedded, and 'platform' is ios, watchos, tvos, macos or catalyst>
Specify the Apple bitcode mode for compile steps targeting device
architectures. Values are of the form '[platform=]mode', where the platform
(which must be 'ios', 'macos', 'tvos', or 'watchos') is optional. If
provided, the bitcode mode is applied for that platform specifically; if
omitted, it is applied for all platforms. The mode must be 'none',
'embedded_markers', or 'embedded'. This option may be provided multiple
times.
The Apple target compiler. Useful for selecting variants of a toolchain (e.
g. xcode-beta).
The label of the crosstool package to be used in Apple and Objc rules and
their dependencies.
Whether to force enable generating debug symbol(.dSYM) file(s) for dbg
builds.
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
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.
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.
Declare the environment_group to use for automatically mapping cpu values
to target_environment values.
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)'.
Maximum number of open files allowed during BEP artifact upload.
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.
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.
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.
Specifies the instance name under which the BES will persist uploaded BEP.
Defaults to null.
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.
Specifies whether to publish BES lifecycle events. (defaults to 'true').
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.
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.
Specifies the maximal size of stdout or stderr to be sent to BEP in a
single message.
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).
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.
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.
If true dex2oat action failures will cause the build to break instead of
executing dex2oat during test runtime.
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.
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.
Using this option will also add: --
bes_upload_mode=wait_for_upload_complete
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
If non-empty, write a JSON serialisation of the build event protocol to
that file.
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
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.
If non-empty, write a textual representation of the build event protocol to
that file
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
Forces test targets tagged 'manual' to be built. 'manual' tests are excluded from processing. This option forces them to be built (but not executed).
Custom key-value string pairs to supply in a build event.
Build python executable zip; on on Windows, off on other platforms
If true, build runfiles symlink forests for all targets. If false, write
only manifests when possible.
If true, write runfiles manifests for all targets. If false, omit them.
Local tests will fail to run when false.
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'
If enabled, when building C++ tests statically and with fission the .dwp
file for the test binary will be automatically built as well.
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.
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.
Comma-separated list of architectures for which to build Apple Catalyst
binaries.
Sets the prefixes of header files that a cc_proto_library creates.
Sets the prefixes of source files that a cc_proto_library creates.
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.
If disabled, .bzl load visibility errors are demoted to warnings.
Check if the direct `bazel_dep` dependencies declared in the root module
are the same versions you get in the resolved dependency graph. Valid
values are `off` to disable the check, `warning` to print a warning when
mismatch detected or `error` to escalate it to a resolution failure.
Check that licensing constraints imposed by dependent packages do not
conflict with distribution modes of the targets being built. By default,
licenses are not checked.
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
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.
If disabled, visibility errors in target dependencies are demoted to
warnings.
When enabled, redundant --defines will be removed early in the build. This
avoids unnecessary loss of the analysis cache for certain types of
equivalent builds.
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.
Specifies desired cumulative coverage report type. At this point only LCOV is supported.
Specify the mode the binary will be built in. Values: 'fastbuild', 'dbg',
'opt'.
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.
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.
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'.
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'.
Location of support files that are required on the inputs of every test
action that collects code coverage. Defaults to '//tools/test:
coverage_support'.
The label of the crosstool package to be used for compiling C++ code.
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.
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
The cs_fdo_profile representing the context sensitive profile to be used
for optimization.
Specifies a custom malloc implementation. This setting overrides malloc
attributes in build rules.
Each --define option specifies an assignment for a build variable.
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.
Whether to include supported Java 8 libraries in apps for legacy devices.
If set, and compilation mode is not 'opt', objc apps will include debug
entitlements when signing.
Discard the analysis cache immediately after the analysis phase completes. Reduces memory usage by ~10%, but makes further incremental builds slower.
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.
Additional places to search for archives before accessing the network to
download them.
How many milliseconds should local execution be delayed, if remote
execution was faster during a build at least once?
The local strategies, in order, to use for the given mnemonic. Passing
'local' as the mnemonic sets the default for unspecified mnemonics. Takes
[mnemonic=]local_strategy[,local_strategy,...]
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.
The remote strategies to use for the given mnemonic. Passing 'remote' as
the mnemonic sets the default for unspecified mnemonics. Takes [mnemonic=]
remote_strategy[,remote_strategy,...]
If true, enables the Bzlmod dependency management system, taking precedence
over WORKSPACE. See https://bazel.build/docs/bzlmod for more information.
If set, use of fdo_absolute_profile_path will raise an error.
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.
Enable runfiles symlink tree; By default, it's off on Windows, on on other
platforms.
Checks the environments each target is compatible with and reports errors
if any target has dependencies that don't support the same environments
Log the executed spawns into this file as delimited Spawn protos, according to src/main/protobuf/spawn.proto. The log is first written unordered and is then, at the end of the invocation, sorted in a stable order (can be CPU and memory intensive). Related flags: --execution_log_json_file (ordered text json format), --experimental_execution_log_file (unordered binary protobuf format), --subcommands (for displaying subcommands in terminal output).
Log the executed spawns into this file as json representation of the delimited Spawn protos, according to src/main/protobuf/spawn.proto. The log is first written unordered and is then, at the end of the invocation, sorted in a stable order (can be CPU and memory intensive). Related flags: Related flags: --execution_log_binary_file (ordered binary protobuf format), --experimental_execution_log_file (unordered binary protobuf format), --subcommands (for displaying subcommands in terminal output).
Whether to sort the execution log. Set to false to improve memory performance, at the cost of producing the log in nondeterministic order.
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.
Deprecated in favor of aspects. Use action_listener to attach an
extra_action to existing build actions.
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.
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'.
Flag to help transition from allowing to disallowing srcs-less
android_library rules with deps. The depot needs to be cleaned up to roll
this out by default.
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.
If set to true, analysis_test native call is available.
Enables resource shrinking for android_binary APKs that use ProGuard.
Use dex2oat in parallel to possibly speed up android_test.
If enabled, adds the JSON profile path to the log.
If true, expand Filesets in the BEP when presenting output files.
If true, fully resolve relative Fileset symlinks in the BEP when presenting
output files. Requires --experimental_build_event_expand_filesets.
The maximum number of times Bazel should retry uploading a build event.
Initial, minimum delay for exponential backoff retries when BEP upload
fails. (exponent: 1.6)
Selects how to upload artifacts referenced in the build event protocol.
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.
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.
If set to true, rule attributes and Starlark API methods needed for the
rule cc_shared_library will be available
Whether to double-check correct desugaring at Android binary level.
When enabled, execution statistics (such as user and system time) are
recorded for locally executed actions which use sandboxing
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.
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.
Configures Credential Helpers to use for retrieving credentials for the provided scope (domain).Credentials from Credential Helpers take precedence over credentials from <code>--google_default_credentials</code>, `--google_credentials`, or <code>.netrc</code>.See https://github.com/bazelbuild/proposals/blob/main/designs/2022-06-07-bazel-credential-helpers.md for details.
Configures the duration for which credentials from Credential Helpers are cached.Invoking with a different value will adjust the lifetime of preexisting entries; pass zero to clear the cache. A clean command always clears the cache, regardless of this flag.
Configures the timeout for the Credential Helper.Credential Helpers failing to respond within this timeout will fail the invocation.
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.
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.
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.
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.
If enabled, Bazel will print more verbose messages about the Docker sandbox
strategy.
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.
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.
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.
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.
If set to true, enables the APIs required to support the Android Starlark
migration.
Enable Docker-based sandboxing. This option has no effect if Docker is not
installed.
Allows objc_* rules to depend on cc_library and causes any objc
dependencies to be built with --cpu set to "ios_<--ios_cpu>" for any values
in --ios_multi_cpu.
Log the executed spawns into this file as delimited Spawn protos, according to src/main/protobuf/spawn.proto. This file is written in order of the execution of the Spawns. Related flags: --execution_log_binary_file (ordered binary protobuf format), --execution_log_json_file (ordered text json format), --subcommands (for displaying subcommands in terminal output).
Include spawn metrics in the executed spawns log.
--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.
Deprecated in favor of aspects. Only schedules extra_actions for top level targets.
If true, then Bazel fetches the entire coverage data directory for each
test during a coverage run.
Filter the ProGuard ProgramJar to remove any classes also present in the
LibraryJar.
If true, coverage for clang will generate an LCOV report.
If enabled, action.env will also return fixed environment variables
specified through features configuration.
If set to true, exposes a number of experimental pieces of Starlark build
API pertaining to Google legacy code.
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.
When enabled, check whether the dependencies of an aar_import are complete.
This enforcement can break the build, or can just result in warnings.
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.
If enabled, C++ .d files will be passed through in memory directly from the
remote build nodes instead of being written to disk.
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.
Whether to make direct file system calls to create symlink trees
Whether to generate J2ObjC header map in parallel of J2ObjC transpilation.
Whether to generate with shorter header path (uses "_ios" instead of
"_j2objc").
Enables reduced classpaths for Java compilations.
If set to true, ctx.actions.expand_template() accepts a TemplateDict
parameter for deferred evaluation of substitution values.
Limit --experimental_run_android_lint_on_java_rules to Android-compatible
libraries.
If materializing param files, do so with direct writes to disk.
Uses these strings as objc fastbuild compiler options.
Whether to perform include scanning for objective C/C++.
If true, use libunwind for stack unwinding, and compile with -fomit-frame-
pointer and -fasynchronous-unwind-tables.
If this flag is set to a value less than 100, Bazel will OOM if, after two
full GC's, more than this percentage of the (old gen) heap is still
occupied.
If enabled, the parse_headers feature does not create a separate header
compile action if a source with the same basename is found in the same
target.
Enable the experimental persistent Java compiler.
Expands to: --strategy=Javac=worker --strategy=JavaIjar=local --
strategy=JavaDeployJar=local --strategy=JavaSourceJar=local --
strategy=Turbine=local
If true, the target platform is used in the output directory name instead
of the CPU.
If set to true, enables a number of platform-related Starlark APIs useful
for debugging.
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.
If set, actions that can only run locally are given first chance at
acquiring resources, dynamically run workers get second chance, and
dynamically-run standalone actions come last.
--experimental_profile_additional_tasks=<phase, action, action_check, action_lock, action_release, action_update, action_complete, info, create_package, remote_execution, local_execution, scanner, local_parse, upload_time, process_time, remote_queue, remote_setup, fetch, 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, local_cpu_usage, system_cpu_usage, local_memory_usage, system_memory_usage, 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 or unknown>
Specifies additional profile tasks to be included in the profile.
Includes the extra "out" attribute in action events that contains the exec
path to the action's primary output.
Includes target label in action events' JSON profile data.
Run extra actions for alternative Java api versions in a proto_library.
Run extra actions for alternative Java api versions in a proto_library.
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.
Whether to make source manifest actions remotable
If set to 'all', all local outputs referenced by BEP are uploaded to remote cache.If set to 'minimal', local outputs referenced by BEP are not uploaded to the remote cache, except for files that are important to the consumers of BEP (e.g. test logs and timing profile). bytestream:// scheme is always used for the uri of files even if they are missing from remote cache.Default to 'all'.
If true, remote cache I/O will happen in the background instead of taking place as the part of a spawn.
If enabled, compress/decompress cache blobs with zstd.
A path to a directory where the corrupted outputs will be captured to.
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.
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
Whether to fall back to the local downloader if remote downloader fails.
Whether to use keepalive for remote execution calls.
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).
If set to true, Bazel will mark inputs as tool inputs for the remote executor. This can be used to implement remote persistent workers.
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.
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.
If set to true, repository_rule gains some remote execution capabilities.
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.
If true, use a string derived from the URLs of repository downloads as the
canonical_id if not specified. This causes a change in the URLs to result
in a redownload even if the cache contains a download with the same hash.
This can be used to verify that URL changes don't result in broken
repositories being masked by the cache.
If set, downloading external repositories is not allowed.
The maximum number of attempts to retry a download error. If set to 0,
retries are disabled.
If non-empty, specifies a file containing a resolved value, against which
the repository directory hashes should be verified
If non-empty, write a Starlark value with the resolved information of all
Starlark repository rules that were executed.
If non-empty read the specified resolved file instead of the WORKSPACE file
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.
--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.
If true, maps the targets of symbolic links specified as action inputs into
the sandbox. This feature exists purely to workaround buggy rules that do
not do this on their own and should be removed once all such rules are
fixed.
Path to the sandboxfs binary to use when --experimental_use_sandboxfs is
true. If a bare name, use the first binary of that name found in the PATH.
Save the state of enabled and requested feautres as an output of
compilation.
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
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.
Displays both analysis and execution phase progress when both are running
concurrently.
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
If true, then Bazel will run coverage postprocessing for test in a new
spawn.
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.
If enabled, the Starlark version of cc_import can be used.
Stream log file uploads directly to the remote storage rather than writing
them to disk.
If this option is enabled, filesets will treat all output artifacts as
regular files. They will not traverse directories or be sensitive to
symlinks.
If true, checks that a Java target explicitly declares all directly used
targets as dependencies.
--experimental_total_worker_memory_limit_mb=<integer, 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.
The maximum size of the stdout / stderr files that will be printed to the
console. -1 implies no limit.
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.
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.
If specified, Bazel will generate llvm-cov coverage map information rather
than gcov when collect_code_coverage is enabled.
Use sandboxfs to create the actions' execroot directories instead of
building a symlink tree. If "yes", the binary provided by --
experimental_sandboxfs_path must be valid and correspond to a supported
version of sandboxfs. If "auto", the binary may be missing or not
compatible.
Whether to run validation actions using aspect (for parallelism with tests).
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.
If list of repository rules for which the hash of the output directory
should be verified, provided a file is specified by --
experimental_repository_hash_file.
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.
If true, experimental Windows support for --watchfs is enabled. Otherwise --watchfsis a non-op on Windows. Make sure to also enable --watchfs.
If enabled, workers are acquired as resources from ResourceManager.
If enabled, Bazel may send cancellation requests to workers that support
them.
If enabled, workers that support the experimental multiplexing feature will
use that feature.
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.
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.
Log certain Workspace Rules events into this file as delimited WorkspaceEvent protos.
Causes the build system to explain each executed step of the build. The
explanation is written to the specified log file.
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.
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().
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().
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.
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
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.
The fdo_profile representing the profile to be used for optimization.
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
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.
Sets a shorthand name for a Starlark flag. It takes a single key-value pair
in the form "<key>=<value>" as an argument.
--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.
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").
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.
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.
A comma-separated list of Google Cloud authentication scopes.
Specifies the file to get authentication credentials from. See https://cloud.google.com/docs/authentication for details.
Whether to use 'Google Application Default Credentials' for authentication. See https://cloud.google.com/docs/authentication for details. Disabled by default.
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
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.
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.
Whether to manually output a heap dump if an OOM is thrown (including OOMs
due to --experimental_oom_more_eagerly_threshold). The dump will be written
to <output_base>/<invocation_id>.heapdump.hprof. This option effectively
replaces -XX:+HeapDumpOnOutOfMemoryError, which has no effect because OOMs
are caught and redirected to Runtime#halt.
Mnemonics of workers to run with high priority. When high priority workers
are running all other workers are throttled.
Specifies the set of environment variables available to actions with host
or execution configurations. Variables can be either specified by name, in
which case the value will be taken from the invocation environment, or by
the name=value pair which sets the value independent of the invocation
environment. This option can be used multiple times; for options given for
the same variable, the latest wins, options for different variables
accumulate.
Specify the mode the tools used during the build will be built in. Values:
'fastbuild', 'dbg', 'opt'.
The C++ compiler to use for host compilation. It is ignored if --
host_crosstool_top is not set.
Additional option to pass to gcc when compiling C source files for host
tools.
By default, the --crosstool_top and --compiler options are also used for
the host configuration. If this flag is provided, Bazel uses the default
libc and compiler for the given crosstool_top.
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.
Overrides the Python version for the host configuration. Can be "PY2" or
"PY3".
If specified, this setting overrides the libc top-level directory (--
grte_top) for the host configuration.
The Java launcher used by tools that are executed during a build.
Additional options to pass to javac when building tools that are executed during a build.
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.
Minimum compatible macOS version for host targets. If unspecified, uses
'macos_sdk_version'.
--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 host or exec configurations. This option can be passed
multiple times. Syntax: regex_filter@option_1,option_2,...,option_n. Where
regex_filter stands for a list of include and exclude regular expression
patterns (Also see --instrumentation_filter). option_1 to option_n stand
for arbitrary command line options. If an option contains a comma it has to
be quoted with a backslash. Options can contain @. Only the first @ is used
to split the string. Example: --host_per_file_copt=//foo/.*\.cc,-//foo/bar\.
cc@-O0 adds the -O0 command line option to the gcc command line of all cc
files in //foo/ except bar.cc.
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.
Do not print a warning when sandboxed execution is not supported on this system.
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.
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).
If enabled, all C++ dynamic linked libraries (DLLs) generated by cc_library
on Windows will be renamed to name_{hash}.dll where hash is calculated
based on the RepositoryName and the DLL's package path. This option is
useful when you have one package which depends on severals cc_library with
the same name (e.g //foo/bar1:utils and //foo/bar2:utils).
If enabled, check testonly for prerequisite targets that are output files
by looking up the testonly of the generating rule. This matches visibility
checking.
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.
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.
When true, Bazel no longer returns a list from linking_context.
libraries_to_link but returns a depset instead.
If true, Bazel will not allow specifying expand_if_all_available in
flag_sets(see https://github.com/bazelbuild/bazel/issues/7008 for migration
instructions).
If enabled, direct usage of the native Android rules is disabled. Please
use the Starlark Android rules from https://github.
com/bazelbuild/rules_android
No-op. Kept here for backwards compatibility.
If set to true, rule attributes cannot set 'cfg = "host"'. Rules should set
'cfg = "exec"' instead.
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.
If set to true, the default value of the `allow_empty` argument of glob()
is False.
If set to true, rule implementation functions may not return a struct. They
must instead return a list of provider instances.
If set to true, `ctx.actions.symlink` will disallow symlinking a file into
a directory.
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.
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).
Use toolchain resolution to select the Android SDK for android rules
(Starlark and native)
Use toolchain resolution to select the Apple SDK for apple rules (Starlark
and native)
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.
If true, exclusive tests will run with sandboxed strategy. Add 'local' tag
to force an exclusive test run locally
If set to true, native.existing_rule and native.existing_rules return
lightweight immutable view objects instead of mutable dicts.
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.
If enabled, set strict header checking in the Starlark API
If set to true, the output_jar, and host_javabase parameters in
pack_sources and host_javabase in compile will all be removed.
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.
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).
If true, the genfiles directory is folded into the bin directory.
If set to true, the API to create actions is only available on `ctx.
actions`, not on `ctx`.
If set to true, disables the function `attr.license`.
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
If set to true, disables the `outputs` parameter of the `rule()` Starlark
function.
In package_group's `packages` attribute, allows writing "public" or
"private" to refer to all packages or no packages respectively.
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`.
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`.
If set to true, outputs referenced by BEP are not uploaded to remote cache if the generating action cannot be cached remotely.
If set to true and --incompatible_remote_symlinks is also true, symlinks in
action outputs are allowed to dangle.
Whether to send all values of a multi-valued header to the remote
downloader instead of just the first.
If set to true, output paths are relative to input root instead of working
directory.
If set to true, --noremote_upload_local_results and --
noremote_accept_cached will not apply to the disk cache. If a combined
cache is used:
--noremote_upload_local_results will cause results to be written to the
disk cache, but not uploaded to the remote cache.
--noremote_accept_cached will result in Bazel checking for results in the
disk cache, but not in the remote cache.
no-remote-exec actions can hit the disk cache.
See #8216 for details.
If set to true, Bazel will represent symlinks in action outputs in the
remote caching/execution protocol as such. Otherwise, symlinks will be
followed and represented as files or directories. See #6631 for details.
If set to true, Bazel will use new exit code 39 instead of 34 if remote
cache evicts blobs during the build.
If true, Bazel will complain when cc_toolchain.cpu and cc_toolchain.
compiler attributes are set (see https://github.
com/bazelbuild/bazel/issues/7075 for migration instructions).
If true, Bazel will not link library dependencies as whole archive by
default (see https://github.com/bazelbuild/bazel/issues/7362 for migration
instructions).
If set to true, `rule` can't be called with the `name` parameter.
If true, Bazel will require 'ctx' parameter in to cc_common.
configure_features (see https://github.com/bazelbuild/bazel/issues/7793 for
more information).
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.
If set to true, the command parameter of actions.run_shell will only accept
string
If set to true, each Linux sandbox will have its own dedicated empty
directory mounted as /tmp rather thansharing /tmp with the host filesystem.
Use --sandbox_add_mount_pair=/tmp to keep seeing the host's /tmp in all
sandboxes.
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.
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.
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.
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.
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.
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.
If true, use --features only for the target configuration and --
host_features for the exec configuration.
If true, constraint settings from @bazel_tools are removed.
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.
If true, Bazel will also validate top level directory header inclusions
(see https://github.com/bazelbuild/bazel/issues/10047 for more information).
If set to true, the visibility of private rule attributes is checked with
respect to the rule definition, rather than the rule usage.
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.
--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.
Use interface shared objects if supported by the toolchain. All ELF
toolchains currently support this setting.
Placeholder option so that we can tell in Blaze whether the spawn scheduler
was enabled.
Minimum compatible iOS version for target simulators and devices. If
unspecified, uses 'ios_sdk_version'.
Comma-separated list of architectures to build an ios_application with. The
result is a universal binary containing all specified architectures.
Specifies the version of the iOS SDK to use to build iOS applications. If
unspecified, uses default iOS SDK version from 'xcode_version'.
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).
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.
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.
Additional options to pass to the J2ObjC tool.
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
Generate dependency information (for now, compile-time classpath) per Java target.
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.
--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.
Additional options to pass to the Java VM. These options will get added to the VM startup options of each java_binary target.
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.
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.
If true, build runfiles symlink forests for external repositories under .
runfiles/wsname/external/repo (in addition to .runfiles/repo).
Use this to suppress generation of the legacy important_outputs field in
the TargetComplete event. important_outputs are required for Bazel to
ResultStore integration.
Specifies a binary to use to generate the list of classes that must be in the main dex when compiling legacy multidex.
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.
--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.
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.
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.
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.
Time to wait between terminating a local process due to timeout and forcefully shutting it down.
--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.
Additional option to pass to the LTO backend step (under --
features=thin_lto).
Additional option to pass to the LTO indexing step (under --
features=thin_lto).
Comma-separated list of architectures for which to build Apple macOS
binaries.
Minimum compatible macOS version for targets. If unspecified, uses
'macos_sdk_version'.
Specifies the version of the macOS SDK to use to build macOS applications.
If unspecified, uses default macOS SDK version from 'xcode_version'.
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.
The maximum number of Starlark computation steps that may be executed by a
BUILD file (zero means no limit).
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.
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.
If set, write memory usage data to the specified file at phase ends and
stable heap to master log at end of build.
Tune memory profile's computation of stable heap at end of build. Should be
two integers separated by a comma. First parameter is the number of GCs to
perform. Second parameter is the number of seconds to wait between GCs.
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.
The maximum depth of the graph internal to a depset (also known as
NestedSet), above which the depset() constructor will fail.
If set, and compilation mode is set to 'dbg', define GLIBCXX_DEBUG,
GLIBCXX_DEBUG_PEDANTIC and GLIBCPP_CONCEPT_CHECKS.
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.
If set, .d files emitted by clang will be used to prune the set of inputs
passed into objc compiles.
Only shows warnings for rules with a name matching the provided regular
expression.
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.
Overrides a module with a local directory.
Overrides a repository with a local directory.
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'.
--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.
--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.
Enable persistent Android dex and desugar actions by using workers.
Expands to: --strategy=Desugar=worker --strategy=DexBuilder=worker
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
Enable persistent multiplexed Android dex and desugar actions by using
workers.
Expands to: --persistent_android_dex_desugar --
modify_execution_info=Desugar=+supports-multiplex-workers --
modify_execution_info=DexBuilder=+supports-multiplex-workers
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
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
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).
The labels of the platform rules describing the target platforms for the
current command.
When building a target //a:a, process headers in all targets that //a:a
depends on (if header processing is enabled for the toolchain).
If set, profile Bazel and write data to the specified file. Use bazel
analyze-profile to analyze the profile.
Show the command progress in the terminal title. Useful to see what bazel is doing when having multiple terminal tabs.
The number of seconds to between reports on still running jobs. The default
value 0 means the first report will be printed after 10 seconds, then 30
seconds and after that progress is reported once every minute. When --
curses is enabled, progress is reported every second.
Specifies which version of ProGuard to use for code removal when building a Java binary.
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
Absolute path name of cc_profile file for Propeller Optimized builds.
Absolute path name of ld_profile file for Propeller Optimized builds.
Label of proto_lang_toolchain() which describes how to compile C++ protos
Label of proto_lang_toolchain() which describes how to compile j2objc protos
Label of proto_lang_toolchain() which describes how to compile Java protos
Label of proto_lang_toolchain() which describes how to compile JavaLite
protos
The absolute path of the Python interpreter invoked to run Python targets
on the target platform. Deprecated; disabled by --
incompatible_use_python_toolchains.
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.
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.
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.
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}".
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
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.
Set the default exec properties to be used as the remote execution platform
if an execution platform does not already set exec_properties.
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.
Does not download any remote build outputs to the local machine. This flag
is a shortcut for flags: --experimental_inmemory_jdeps_files, --
experimental_inmemory_dotd_files, --
experimental_action_cache_store_output_metadata and --
remote_download_outputs=minimal.
Expands to: --nobuild_runfile_links --experimental_inmemory_jdeps_files --
experimental_inmemory_dotd_files --
experimental_action_cache_store_output_metadata --
remote_download_outputs=minimal
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.
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.
Only downloads remote outputs of top level targets to the local machine.
This flag is a shortcut for flags: --experimental_inmemory_jdeps_files, --
experimental_inmemory_dotd_files, --
experimental_action_cache_store_output_metadata and --
remote_download_outputs=toplevel.
Expands to: --experimental_inmemory_jdeps_files --
experimental_inmemory_dotd_files --
experimental_action_cache_store_output_metadata --
remote_download_outputs=toplevel
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.
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.
The relative priority of actions to be executed remotely. The semantics of the particular priority values are server-dependent.
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.
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.
Whether to fall back to standalone local execution strategy if remote execution fails.
No-op, deprecated. See https://github.com/bazelbuild/bazel/issues/7480 for details.
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.
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.
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).
The relative priority of remote actions to be stored in remote cache. The semantics of the particular priority values are server-dependent.
The maximum number of attempts to retry a transient error. If set to 0, retries are disabled.
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.
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.
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.
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.
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.
If set to true, directories used by sandboxed non-worker execution may be
reused to avoid unnecessary setup costs.
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'.
Whether to run validation actions as part of the build. See https://bazel.
build/rules/rules#validation_actions
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.
If true, any shard in which at least one run/attempt passes and at least one run/attempt fails gets a FLAKY status.
Add additional path pair to mount in sandbox.
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.
Enables debugging features for the sandboxing feature. This includes two
things: first, the sandbox root contents are left untouched after a build
(and if sandboxfs is in use, the file system is left mounted); and second,
prints extra debugging information on execution. This can help developers
of Bazel or Starlark rules with debugging failures due to missing input
files, etc.
Allow network access by default for actions; this may not work with all sandboxing implementations.
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.
Change the current hostname to 'localhost' for sandboxed actions.
Change the current username to 'nobody' for sandboxed actions.
For sandboxed actions, mount an empty, writable directory at this absolute
path (if supported by the sandboxing implementation, ignored otherwise).
For sandboxed actions, make an existing directory writable in the sandbox
(if supported by the sandboxing implementation, ignored otherwise).
If set, temporary outputs from gcc will be saved. These include .s files
(assembler code), .i files (preprocessed C) and .ii files (preprocessed
C++).
If true, native libraries that contain identical functionality will be
shared among different targets
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.
If enabled, causes Bazel to print "Loading package:" messages.
Minimum number of seconds between progress messages in the output.
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.
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.
Slims down the size of the JSON profile by merging events if the profile
gets too large.
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.
Stamp binaries with the date, username, hostname, workspace information,
etc.
Writes into the specified file a pprof profile of CPU usage by all Starlark
threads.
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.
Override which spawn strategy should be used to execute spawn actions that
have descriptions matching a certain regex_filter. See --per_file_copt for
details onregex_filter matching. The first regex_filter that matches the
description is used. This option overrides other flags for specifying
strategy. Example: --strategy_regexp=//foo.*\.cc,-//foo/bar=local means to
run actions using local strategy if their descriptions match //foo.*.cc but
not //foo/bar. Example: --strategy_regexp='Compiling.*/bar=local --
strategy_regexp=Compiling=sandboxed will run 'Compiling //foo/bar/baz' with
the 'local' strategy, but reversing the order would run it with
'sandboxed'.
If this option is enabled, filesets crossing package boundaries are
reported as errors. It does not work when
check_fileset_dependencies_recursively is disabled.
Unless OFF, checks that a proto_library target explicitly declares all
directly used targets as dependencies.
Unless OFF, checks that a proto_library target explicitly declares all
targets used in 'import public' as exported.
If true, headers found through system include paths (-isystem) are also
required to be declared.
Specifies whether to strip binaries and shared libraries (using "-Wl,--
strip-debug"). The default value of 'sometimes' means strip iff --
compilation_mode=fastbuild.
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).
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.
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.
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.
The label of a platform rule that should be used if no target platform is
set and no platform mapping matches the current set of flags.
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.
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.
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.
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.
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.
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).
Forwards fail fast option to the test runner. The test runner should stop execution upon first failure.
Specify strategy for test sharding: 'explicit' to only use sharding if the 'shard_count' BUILD attribute is present. 'disabled' to never use test sharding.
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.
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.
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.
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.
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.
Specify a path to a TLS certificate that is trusted to sign server certificates.
Specify the TLS client certificate to use; you also need to provide a client key to enable client authentication.
Specify the TLS client key to use; you also need to provide a client certificate to enable client authentication.
The Java language version used to execute the tools that are needed during a build
--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.
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.
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.
Comma-separated list of architectures for which to build Apple tvOS
binaries.
Minimum compatible tvOS version for target simulators and devices. If
unspecified, uses 'tvos_sdk_version'.
Specifies the version of the tvOS SDK to use to build tvOS applications. If
unspecified, uses default tvOS SDK version from 'xcode_version'.
The device to simulate when running an tvOS application in the simulator, e.
g. 'Apple TV 1080p'. You can get a list of devices by running 'xcrun simctl
list devicetypes' on the machine the simulator will be run on.
The version of tvOS to run on the simulator when running or testing.
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.
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.
If enabled, this option causes Java compilation to use interface jars. This will result in faster incremental compilation, but error messages can be different.
This option is a deprecated. It is now a no-op and will be removed soon.
Increases the verbosity of the explanations issued if --explain is enabled.
Has no effect if --explain is not enabled.
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.
Comma-separated list of architectures for which to build Apple watchOS
binaries.
Minimum compatible watchOS version for target simulators and devices. If
unspecified, uses 'watchos_sdk_version'.
Specifies the version of the watchOS SDK to use to build watchOS
applications. If unspecified, uses default watchOS SDK version from
'xcode_version'.
The device to simulate when running an watchOS application in the
simulator, e.g. 'Apple Watch - 38mm'. You can get a list of devices by
running 'xcrun simctl list devicetypes' on the machine the simulator will
be run on.
The version of watchOS to run on the simulator when running or testing.
Extra command-flags that will be passed to worker processes in addition to
--persistent_worker, keyed by mnemonic (e.g. --worker_extra_flag=Javac=--
debug.
--worker_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 a worker process (like the persistent Java compiler)
may be launched if you use the 'worker' strategy. May be specified as
[name=value] to give a different value per worker mnemonic. Takes an
integer, or a keyword ("auto", "HOST_CPUS", "HOST_RAM"), optionally
followed by an operation ([-|*]<float>) eg. "auto", "HOST_CPUS*.5". 'auto'
calculates a reasonable default based on machine capacity. "=value" sets a
default for unspecified mnemonics.
--worker_max_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 --experimental_worker_multiplex. May be
specified as [name=value] to give a different value per worker mnemonic.
Takes an integer, or a keyword ("auto", "HOST_CPUS", "HOST_RAM"),
optionally followed by an operation ([-|*]<float>) eg. "auto", "HOST_CPUS*.
5". 'auto' calculates a reasonable default based on machine capacity.
"=value" sets a default for unspecified mnemonics.
If enabled, workers will be executed in a sandboxed environment.
If enabled, prints verbose messages when workers are started, shutdown, ...
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.
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.
If specified, uses Xcode of the given version for relevant build actions.
If unspecified, uses the executor default version of Xcode.
The label of the xcode_config rule to be used for selecting the Xcode
version in the build configuration.