From 0e3698a8a0de5a02307efb81549bcc3226071caf Mon Sep 17 00:00:00 2001 From: kshyanashree <109167932+kshyanashree@users.noreply.github.com> Date: Fri, 24 Feb 2023 01:53:24 -0800 Subject: [PATCH] Bump minimum supported macOS versions to 10.13 (#17570) 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 Co-authored-by: Daniel Wagner-Hall --- scripts/bootstrap/compile.sh | 2 +- tools/cpp/osx_cc_configure.bzl | 4 ++-- tools/osx/BUILD | 2 +- tools/osx/xcode_configure.bzl | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/bootstrap/compile.sh b/scripts/bootstrap/compile.sh index 09cdd8f70e0648..8528e431fc3558 100755 --- a/scripts/bootstrap/compile.sh +++ b/scripts/bootstrap/compile.sh @@ -415,7 +415,7 @@ cp $OUTPUT_DIR/libblaze.jar ${ARCHIVE_DIR} # 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 1181943feb2a87..cbfc6afe27429e 100644 --- a/tools/cpp/osx_cc_configure.bzl +++ b/tools/cpp/osx_cc_configure.bzl @@ -68,7 +68,7 @@ def _compile_cc_file_single_arch(repository_ctx, src_name, out_name, timeout): "--sdk", "macosx", "clang", - "-mmacosx-version-min=10.9", + "-mmacosx-version-min=10.13", "-std=c++11", "-lc++", "-O3", @@ -98,7 +98,7 @@ def _compile_cc_file(repository_ctx, src_name, out_name, timeout): "--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 990afe3e8ce31b..79344650445338 100644 --- a/tools/osx/BUILD +++ b/tools/osx/BUILD @@ -28,7 +28,7 @@ exports_files([ ]) 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 d10daae0b3f3a8..26854db697b1e3 100644 --- a/tools/osx/xcode_configure.bzl +++ b/tools/osx/xcode_configure.bzl @@ -131,7 +131,7 @@ def run_xcode_locator(repository_ctx, xcode_locator_src_label): "--sdk", "macosx", "clang", - "-mmacosx-version-min=10.9", + "-mmacosx-version-min=10.13", "-fobjc-arc", "-framework", "CoreServices",