bazel: Add flag required by ResultStore

Internally, see
https://groups.google.com/a/google.com/g/resultstore-announce/c/qlGd58Sp3vg/m/dgmpm5d_AAAJ
for additional context.

Change-Id: Id1d226709081a1815b6b47a21eda514259546a36
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/showcase/sense/+/236553
Reviewed-by: Armando Montanez <amontanez@google.com>
Presubmit-Verified: CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com>
Pigweed-Auto-Submit: Ted Pudlik <tpudlik@google.com>
Lint: Lint 🤖 <android-build-ayeaye@system.gserviceaccount.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed-service-accounts.iam.gserviceaccount.com>
diff --git a/.bazelrc b/.bazelrc
index 83225a9..180b3a5 100644
--- a/.bazelrc
+++ b/.bazelrc
@@ -110,6 +110,9 @@
 common:remote_cache --remote_instance_name=projects/pigweed-rbe-open/instances/default-instance
 common:remote_cache --remote_upload_local_results=false
 common:remote_cache --bes_backend="buildeventservice.googleapis.com"
+# Required to use buildeventservice on Bazel 8+.
+# TODO: b/345556899 -- Remove this flag when no longer required.
+common:remote_cache --legacy_important_outputs
 common:remote_cache --bes_timeout=60s
 common:remote_cache --bes_results_url="https://source.cloud.google.com/results/invocations/"
 common:remote_cache --remote_instance_name=projects/pigweed-rbe-open/instances/default-instance