Restore macOS 10.10 version compatibility to Bazel
This is part of the fixes for #11442. (Not a complete fix because it does not address the bazel 2 branch).
It makes the macOS deployment target 10.10. Then it wraps the calls to the macOS logging infrastructure so they only execute on macOS 10.12+.
I've tested this change and a similar cherry-pick on tag 2.2.0 and confirmed this results in a functioning Bazel (at least for the targets we build) on macOS 10.10.
I have questions around what I can do better:
1. I have just added a universal .bazelrc entry. Is there some way to gate this to just macOS in the Bazel infrastructure? Is that even necessary?
2. The Bazel tagged versions are just tags and not branches, which means I cannot submit a PR for a backport to Bazel 2.2. How would you like to handle this?
Closes #11565.
PiperOrigin-RevId: 318770522
diff --git a/.bazelrc b/.bazelrc
index 35e52ce..10a5a1f 100644
--- a/.bazelrc
+++ b/.bazelrc
@@ -1,3 +1,5 @@
+common --enable_platform_specific_config
+
# Shared configuration flags to build and test Bazel on RBE.
build:remote_shared --define=EXECUTOR=remote
build:remote_shared --remote_instance_name=projects/bazel-untrusted/instances/default_instance
@@ -39,5 +41,7 @@
# Alias
build:remote --config=ubuntu1604_java8
+build:macos --macos_minimum_os=10.10
+
# User-specific .bazelrc
try-import user.bazelrc