Bump minimum supported macOS versions to 10.13

As per https://developer.apple.com/support/xcode/ Xcode from 14.0 no longer supports targeting 10.9, and attempting to do so may fail in obscure ways.

10.13 is still 5+ years old, so we retain coverage for a reasonable range on macOS versions.

Closes #17451.

PiperOrigin-RevId: 511577111
Change-Id: I770ff101f52d16f2fc402f054579740b650986cc
diff --git a/scripts/bootstrap/compile.sh b/scripts/bootstrap/compile.sh
index 245f311..8e6f13e 100755
--- a/scripts/bootstrap/compile.sh
+++ b/scripts/bootstrap/compile.sh
@@ -415,7 +415,7 @@
 # TODO(b/28965185): Remove when xcode-locator is no longer required in embedded_binaries.
 log "Compiling xcode-locator..."
 if [[ $PLATFORM == "darwin" ]]; then
-  run /usr/bin/xcrun --sdk macosx clang -mmacosx-version-min=10.9 -fobjc-arc -framework CoreServices -framework Foundation -o ${ARCHIVE_DIR}/xcode-locator tools/osx/xcode_locator.m
+  run /usr/bin/xcrun --sdk macosx clang -mmacosx-version-min=10.13 -fobjc-arc -framework CoreServices -framework Foundation -o ${ARCHIVE_DIR}/xcode-locator tools/osx/xcode_locator.m
 else
   cp tools/osx/xcode_locator_stub.sh ${ARCHIVE_DIR}/xcode-locator
 fi
diff --git a/tools/cpp/osx_cc_configure.bzl b/tools/cpp/osx_cc_configure.bzl
index 1181943..cbfc6af 100644
--- a/tools/cpp/osx_cc_configure.bzl
+++ b/tools/cpp/osx_cc_configure.bzl
@@ -68,7 +68,7 @@
         "--sdk",
         "macosx",
         "clang",
-        "-mmacosx-version-min=10.9",
+        "-mmacosx-version-min=10.13",
         "-std=c++11",
         "-lc++",
         "-O3",
@@ -98,7 +98,7 @@
         "--sdk",
         "macosx",
         "clang",
-        "-mmacosx-version-min=10.9",
+        "-mmacosx-version-min=10.13",
         "-std=c++11",
         "-lc++",
         "-arch",
diff --git a/tools/osx/BUILD b/tools/osx/BUILD
index 990afe3..7934465 100644
--- a/tools/osx/BUILD
+++ b/tools/osx/BUILD
@@ -28,7 +28,7 @@
 ])
 
 DARWIN_XCODE_LOCATOR_COMPILE_COMMAND = """
-  /usr/bin/xcrun --sdk macosx clang -mmacosx-version-min=10.9 -fobjc-arc -framework CoreServices \
+  /usr/bin/xcrun --sdk macosx clang -mmacosx-version-min=10.13 -fobjc-arc -framework CoreServices \
       -framework Foundation -arch arm64 -arch x86_64 -Wl,-no_adhoc_codesign -Wl,-no_uuid -o $@ $< && \
   env -i codesign --identifier $@ --force --sign - $@
 """
diff --git a/tools/osx/xcode_configure.bzl b/tools/osx/xcode_configure.bzl
index d10daae..26854db 100644
--- a/tools/osx/xcode_configure.bzl
+++ b/tools/osx/xcode_configure.bzl
@@ -131,7 +131,7 @@
         "--sdk",
         "macosx",
         "clang",
-        "-mmacosx-version-min=10.9",
+        "-mmacosx-version-min=10.13",
         "-fobjc-arc",
         "-framework",
         "CoreServices",