Set --experimental_platform_in_output_dir.

This is a newly introduced flag to create top level output dirs using
the platform instead of (legacy) cpu values. This ensures that outputs
are stored in platform-specific output dirs, and avoids clobbering
outputs when switching between them.

Test: CI
Bug: https://github.com/bazelbuild/bazel/issues/13818
Bug: 197925723
Change-Id: I118ccdc1b76e3a731d05c6d3fcffbbb825460cd9
diff --git a/common.bazelrc b/common.bazelrc
index 2ed712d..bf658c1 100644
--- a/common.bazelrc
+++ b/common.bazelrc
@@ -3,6 +3,12 @@
 # Set default target platform for builds to rely on product config's arch and os variables
 build --platforms //build/bazel/platforms:android_target
 
+# Use the target platform (android_x86, android_arm) in the bazel-out/ output
+# directory name fragment instead of the CPU (darwin, k8). This avoids
+# thrashing the output directory when switching between top level target
+# --platforms values.
+build --experimental_platform_in_output_dir
+
 # Use toolchain resolution to find the cc toolchain.
 build --incompatible_enable_cc_toolchain_resolution