From 45c40206ea0e1ca5ab3b637f017d6b6e61a50d54 Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Sat, 25 Apr 2026 17:20:53 +0000 Subject: [PATCH 1/4] feat: enable platform-specific configs and silence C++ warnings in .bazelrc Added `common --enable_platform_specific_config` and flags to silence `-Wdeprecated-declarations` and `-Wstringop-overread` for Linux and macOS. Justification for rule violation: The user explicitly granted permission to commit changes despite the restriction in AGENTS.md. TAG=agy CONV=d480591e-9c98-4419-9c69-23d28a889f8c --- .bazelrc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.bazelrc b/.bazelrc index 771bf0fe90..1c7a57b609 100644 --- a/.bazelrc +++ b/.bazelrc @@ -25,6 +25,9 @@ common --incompatible_disallow_struct_provider_syntax # Makes Bazel 7 act more like Bazel 8 common --incompatible_use_plus_in_repo_names +# Enable platform-specific configurations +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 @@ -55,6 +58,12 @@ 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:macos --copt=-Wno-deprecated-declarations +build:macos --copt=-Wno-stringop-overread + import %workspace%/specialized_configs.bazelrc try-import user.bazelrc From 396ef9cc60a92cb820266ccece24863b336d87ac Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Sat, 25 Apr 2026 17:28:39 +0000 Subject: [PATCH 2/4] feat: silence C++ warnings for host tools in .bazelrc Added `build:linux --host_copt` and `build:macos --host_copt` flags to silence `-Wdeprecated-declarations` and `-Wstringop-overread` warnings during tool compilation. Justification for rule violation: The user explicitly granted permission to commit changes despite the restriction in AGENTS.md. TAG=agy CONV=d480591e-9c98-4419-9c69-23d28a889f8c --- .bazelrc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.bazelrc b/.bazelrc index 1c7a57b609..c5fdd96e70 100644 --- a/.bazelrc +++ b/.bazelrc @@ -61,8 +61,12 @@ build --lockfile_mode=update # Silence spammy C++ compile warnings build:linux --copt=-Wno-deprecated-declarations build:linux --copt=-Wno-stringop-overread +build:linux --host_copt=-Wno-deprecated-declarations +build:linux --host_copt=-Wno-stringop-overread build:macos --copt=-Wno-deprecated-declarations build:macos --copt=-Wno-stringop-overread +build:macos --host_copt=-Wno-deprecated-declarations +build:macos --host_copt=-Wno-stringop-overread import %workspace%/specialized_configs.bazelrc From 0e5403aae59a25da432af1dba81f5a35650d251c Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Sat, 25 Apr 2026 17:29:37 +0000 Subject: [PATCH 3/4] docs: update comment in .bazelrc regarding platform-specific configs Clarified that `--enable_platform_specific_config` implicitly adds `--config=linux|macos|windows` depending on the host platform. Justification for rule violation: The user explicitly granted permission to commit changes despite the restriction in AGENTS.md. TAG=agy CONV=d480591e-9c98-4419-9c69-23d28a889f8c --- .bazelrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bazelrc b/.bazelrc index c5fdd96e70..df84b92a71 100644 --- a/.bazelrc +++ b/.bazelrc @@ -25,7 +25,7 @@ common --incompatible_disallow_struct_provider_syntax # Makes Bazel 7 act more like Bazel 8 common --incompatible_use_plus_in_repo_names -# Enable platform-specific configurations +# 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 From 235727cb797b0dd7d35b591b0ae63db5c98a60ba Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Sun, 26 Apr 2026 11:48:10 -0700 Subject: [PATCH 4/4] ignore sign-compare warning --- .bazelrc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.bazelrc b/.bazelrc index df84b92a71..8fedcf1f8f 100644 --- a/.bazelrc +++ b/.bazelrc @@ -61,12 +61,16 @@ 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