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).
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.
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 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
Custom key-value string pairs to supply in a build event.
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.
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.
Additional places to search for archives before accessing the network to
download them.
If true, enables the Bzlmod dependency management system, taking precedence
over WORKSPACE. See https://bazel.build/docs/bzlmod for more information.
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.
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.
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.
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 set to true, rule attributes and Starlark API methods needed for the
rule cc_shared_library will be available
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 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.
If set to true, enables the APIs required to support the Android Starlark
migration.
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.
If set to true, ctx.actions.expand_template() accepts a TemplateDict
parameter for deferred evaluation of substitution values.
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 set to true, enables a number of platform-related Starlark APIs useful
for debugging.
--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.
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.
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 read the specified resolved file instead of the WORKSPACE file
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.
Stream log file uploads directly to the remote storage rather than writing
them to disk.
The maximum size of the stdout / stderr files that will be printed to the
console. -1 implies no limit.
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.
If true, experimental Windows support for --watchfs is enabled. Otherwise --watchfsis a non-op on Windows. Make sure to also enable --watchfs.
Log certain Workspace Rules events into this file as delimited WorkspaceEvent protos.
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.
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.
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.
Iff non-zero, then shutdown will only shut down the server if the total
memory (in MB) consumed by the JVM exceeds this value.
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.
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.
When true, Bazel no longer returns a list from linking_context.
libraries_to_link but returns a depset instead.
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 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 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, 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 set to true, `rule` can't be called with the `name` parameter.
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 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.
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 set to true, the visibility of private rule attributes is checked with
respect to the rule definition, rather than the rule usage.
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.
Use this to suppress generation of the legacy important_outputs field in
the TargetComplete event. important_outputs are required for Bazel to
ResultStore integration.
The maximum number of Starlark computation steps that may be executed by a
BUILD file (zero means no limit).
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.
The maximum depth of the graph internal to a depset (also known as
NestedSet), above which the depset() constructor will fail.
Overrides a module with a local directory.
Overrides a repository with a local directory.
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.
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.
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.
Minimum number of seconds between progress messages in the output.
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.
Writes into the specified file a pprof profile of CPU usage by all Starlark
threads.
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.
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.
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.
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.