From 43dadb275b3f9690242bf2d94a0757c721d231a9 Mon Sep 17 00:00:00 2001 From: Daniel Wagner-Hall Date: Wed, 22 Feb 2023 13:10:04 -0800 Subject: [PATCH] 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 --- 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 245f311ef680f9..8e6f13e8008561 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",