| # Bazel settings that apply to this repository. | |
| # Take care to document any settings that you expect users to apply. | |
| # Settings that apply only to CI are in .github/workflows/ci.bazelrc | |
| # The main ingredient: allow us to register toolchains other than com_google_protobuf targets | |
| common --incompatible_enable_proto_toolchain_resolution | |
| common --@aspect_rules_py//py:interpreter_version=3.9.18 | |
| # See https://github.com/bazelbuild/rules_python/issues/1069#issuecomment-1942053014 | |
| common --action_env=RULES_PYTHON_ENABLE_PYSTAR=0 | |
| # Don’t want to push a rules author to update their deps if not needed. | |
| # https://bazel.build/reference/command-line-reference#flag--check_direct_dependencies | |
| # https://bazelbuild.slack.com/archives/C014RARENH0/p1691158021917459?thread_ts=1691156601.420349&cid=C014RARENH0 | |
| common --check_direct_dependencies=off | |
| # Force rules_go to disable CGO even though we have a (fake) C++ toolchain registered. | |
| common --host_platform=//:no_cgo_host_platform | |
| # Load any settings specific to the current user. | |
| # .bazelrc.user should appear in .gitignore so that settings are not shared with team members | |
| # This needs to be last statement in this | |
| # config, as the user configuration should be able to overwrite flags from this file. | |
| # See https://docs.bazel.build/versions/master/best-practices.html#bazelrc | |
| # (Note that we use .bazelrc.user so the file appears next to .bazelrc in directory listing, | |
| # rather than user.bazelrc as suggested in the Bazel docs) | |
| try-import %workspace%/.bazelrc.user |