| # For bazel-in-bazel testing | |
| # Trick bazel into treating BUILD files under examples/* as being regular files | |
| # This lets us glob() up all the files inside the examples to make them inputs to tests | |
| # (Note, we cannot use `common --deleted_packages` because the bazel version command doesn't support it) | |
| # To update the file, execute | |
| import %workspace%/.bazelrc.deleted_packages | |
| # Symlinks are used extensively because of runfiles, venvs, and other reasons. | |
| # Supporting otherwise is very complex with little benefit. | |
| startup --windows_enable_symlinks | |
| test --test_output=errors | |
| # Do NOT implicitly create empty __init__.py files in the runfiles tree. | |
| # By default, these are created in every directory containing Python source code | |
| # or shared libraries, and every parent directory of those directories, | |
| # excluding the repo root directory. With this flag set, we are responsible for | |
| # creating (possibly empty) __init__.py files and adding them to the srcs of | |
| # Python targets as required. | |
| build --incompatible_default_to_explicit_init_py | |
| build --//python/config_settings:incompatible_default_to_explicit_init_py=True | |
| build --aspects=//tests/support/pyrefly:pyrefly.bzl%pyrefly_aspect | |
| # Ensure ongoing compatibility with this flag. | |
| common --incompatible_disallow_struct_provider_syntax | |
| # Makes Bazel 7 act more like Bazel 8 | |
| common --incompatible_use_plus_in_repo_names | |
| # Implicitly adds --config=linux|macos|windows, depending on the host platform | |
| common --enable_platform_specific_config | |
| # Needed to make Windows with a py_binary in data deps work. The Bazel launcher | |
| # is used, which falls back to finding python.exe on PATH to bootstrap. | |
| # See https://github.com/bazel-contrib/rules_python/issues/3655 | |
| common --incompatible_strict_action_env=false | |
| # To work around bug on bazel 7 | |
| common:ci --experimental_repository_cache_hardlinks=false | |
| # Windows makes use of runfiles for some rules | |
| build --enable_runfiles | |
| # Make Bazel 7 use bzlmod by default | |
| common --enable_bzlmod | |
| # Local disk cache greatly speeds up builds if the regular cache is lost | |
| common --disk_cache=~/.cache/bazel/bazel-disk-cache | |
| # Drop `experimental_` prefix once Bazel 7 is no longer supported | |
| common --experimental_downloader_config=downloader_config.cfg | |
| common --http_timeout_scaling=10.0 | |
| common --experimental_repository_downloader_retries=10 | |
| # Additional config to use for readthedocs builds. | |
| # See .readthedocs.yml for additional flags that can only be determined from | |
| # the runtime environment. | |
| build:rtd --stamp | |
| # Some bzl files contain repos only available under bzlmod | |
| build:rtd --enable_bzlmod | |
| common --incompatible_python_disallow_native_rules | |
| common --incompatible_no_implicit_file_export | |
| build --lockfile_mode=update | |
| # Silence spammy C++ compile warnings | |
| build:linux --copt=-Wno-deprecated-declarations | |
| build:linux --copt=-Wno-stringop-overread | |
| build:linux --copt=-Wno-sign-compare | |
| build:linux --host_copt=-Wno-deprecated-declarations | |
| build:linux --host_copt=-Wno-stringop-overread | |
| build:linux --host_copt=-Wno-sign-compare | |
| build:macos --copt=-Wno-deprecated-declarations | |
| build:macos --copt=-Wno-stringop-overread | |
| build:macos --copt=-Wno-sign-compare | |
| build:macos --host_copt=-Wno-deprecated-declarations | |
| build:macos --host_copt=-Wno-stringop-overread | |
| build:macos --host_copt=-Wno-sign-compare | |
| import %workspace%/specialized_configs.bazelrc | |
| try-import user.bazelrc |