Skip to content

Commit 44b68cb

Browse files
authored
Merge pull request #75914 from benlangmuir/turn-it-up-to-11
Bump the deployment target for the compiler to macOS 13.0
2 parents 23577af + ae3e4a1 commit 44b68cb

File tree

13 files changed

+39
-33
lines changed

13 files changed

+39
-33
lines changed

CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -556,16 +556,16 @@ option(SWIFT_ALLOW_LINKING_SWIFT_CONTENT_IN_DARWIN_TOOLCHAIN
556556
This is needed to support Apple internal configurations."
557557
FALSE)
558558

559-
set(SWIFT_DARWIN_DEPLOYMENT_VERSION_OSX "10.13" CACHE STRING
559+
set(SWIFT_DARWIN_DEPLOYMENT_VERSION_OSX "13.0" CACHE STRING
560560
"Minimum deployment target version for OS X")
561561

562-
set(SWIFT_DARWIN_DEPLOYMENT_VERSION_IOS "11.0" CACHE STRING
562+
set(SWIFT_DARWIN_DEPLOYMENT_VERSION_IOS "16.0" CACHE STRING
563563
"Minimum deployment target version for iOS")
564564

565-
set(SWIFT_DARWIN_DEPLOYMENT_VERSION_TVOS "11.0" CACHE STRING
565+
set(SWIFT_DARWIN_DEPLOYMENT_VERSION_TVOS "16.0" CACHE STRING
566566
"Minimum deployment target version for tvOS")
567567

568-
set(SWIFT_DARWIN_DEPLOYMENT_VERSION_WATCHOS "4.0" CACHE STRING
568+
set(SWIFT_DARWIN_DEPLOYMENT_VERSION_WATCHOS "9.0" CACHE STRING
569569
"Minimum deployment target version for watchOS")
570570

571571
set(SWIFT_DARWIN_DEPLOYMENT_VERSION_XROS "1.0" CACHE STRING

benchmark/cmake/modules/AddSwiftBenchmarkSuite.cmake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,10 @@ macro(configure_sdks_darwin)
110110
set(appletvos_arch "arm64")
111111
set(watchos_arch "armv7k" "arm64_32")
112112

113-
set(macosx_ver "10.13")
114-
set(iphoneos_ver "11.0")
115-
set(appletvos_ver "11.0")
116-
set(watchos_ver "4.0")
113+
set(macosx_ver "13.0")
114+
set(iphoneos_ver "16.0")
115+
set(appletvos_ver "16.0")
116+
set(watchos_ver "9.0")
117117

118118
set(macosx_vendor "apple")
119119
set(iphoneos_vendor "apple")

cmake/modules/SwiftConfigureSDK.cmake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ function(_report_sdk prefix)
6868
endfunction()
6969

7070
# Remove architectures not supported by the SDK from the given list.
71-
function(remove_sdk_unsupported_archs name os sdk_path architectures_var)
71+
function(remove_sdk_unsupported_archs name os sdk_path deployment_version architectures_var)
7272
execute_process(COMMAND
7373
/usr/libexec/PlistBuddy -c "Print :SupportedTargets:${os}:Archs" ${sdk_path}/SDKSettings.plist
7474
OUTPUT_VARIABLE sdk_supported_archs
@@ -87,11 +87,11 @@ function(remove_sdk_unsupported_archs name os sdk_path architectures_var)
8787
# 32-bit iOS simulator is not listed explicitly in SDK settings.
8888
message(STATUS "Assuming ${name} SDK at ${sdk_path} supports architecture ${arch}")
8989
list(APPEND architectures ${arch})
90-
elseif(arch STREQUAL "armv7k" AND os STREQUAL "watchos")
90+
elseif(arch STREQUAL "armv7k" AND os STREQUAL "watchos" AND deployment_version VERSION_LESS "9.0")
9191
# 32-bit watchOS is not listed explicitly in SDK settings.
9292
message(STATUS "Assuming ${name} SDK at ${sdk_path} supports architecture ${arch}")
9393
list(APPEND architectures ${arch})
94-
elseif(arch STREQUAL "i386" AND os STREQUAL "watchsimulator")
94+
elseif(arch STREQUAL "i386" AND os STREQUAL "watchsimulator" AND deployment_version VERSION_LESS "7.0")
9595
# 32-bit watchOS simulator is not listed explicitly in SDK settings.
9696
message(STATUS "Assuming ${name} SDK at ${sdk_path} supports architecture ${arch}")
9797
list(APPEND architectures ${arch})
@@ -229,7 +229,7 @@ macro(configure_sdk_darwin
229229
endif()
230230

231231
# Remove any architectures not supported by the SDK.
232-
remove_sdk_unsupported_archs(${name} ${xcrun_name} ${SWIFT_SDK_${prefix}_PATH} SWIFT_SDK_${prefix}_ARCHITECTURES)
232+
remove_sdk_unsupported_archs(${name} ${xcrun_name} ${SWIFT_SDK_${prefix}_PATH} "${SWIFT_SDK_${prefix}_DEPLOYMENT_VERSION}" SWIFT_SDK_${prefix}_ARCHITECTURES)
233233

234234
list_intersect(
235235
"${SWIFT_DARWIN_MODULE_ARCHS}" # lhs

test/Interpreter/SDK/submodules_smoke_test.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
// REQUIRES: OS=macosx
77

88
import OpenGL.GL3
9-
_ = glGetString
10-
_ = OpenGL.glGetString
9+
_ = glGetString // expected-warning * {{'glGetString' was deprecated}}
10+
_ = OpenGL.glGetString // expected-warning * {{'glGetString' was deprecated}}
1111
_ = GL_COLOR_BUFFER_BIT
1212
_ = OpenGL.GL_COLOR_BUFFER_BIT
1313

test/embedded/lit.local.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ config.substitutions = list(config.substitutions)
44
if config.target_sdk_name == 'macosx':
55
def do_fixup(key, value):
66
if isinstance(value, str):
7-
value = value.replace("-apple-macosx10.13", "-apple-macos14")
7+
value = value.replace("-apple-macosx13.0", "-apple-macos14")
88
elif isinstance(value, SubstituteCaptures):
9-
value.substitution = value.substitution.replace("-apple-macosx10.13", "-apple-macos14")
9+
value.substitution = value.substitution.replace("-apple-macosx13.0", "-apple-macos14")
1010
return (key, value)
1111

1212
config.substitutions = [do_fixup(a, b) for (a, b) in config.substitutions]

test/stdlib/Foundation_NewGenericAPIs.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ func test_NSCoder_decodeTopLevelObjectOfClasses_forKey_error(
4141

4242

4343
func test_NSKeyedUnarchiver_unarchiveObjectWithData(_ data: NSData) {
44-
var r = NSKeyedUnarchiver.unarchiveObject(with: data as Data)
44+
var r = NSKeyedUnarchiver.unarchiveObject(with: data as Data) // expected-warning * {{'unarchiveObject(with:)' was deprecated}}
4545
expectType(Optional<Any>.self, &r)
4646
}
4747

test/stdlib/Reflection_objc.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
// RUN: %empty-directory(%t)
22
//
33
// RUN: %target-clang %S/Inputs/Mirror/Mirror.mm -c -o %t/Mirror.mm.o -g
4-
// RUN: %target-build-swift -parse-stdlib %s -module-name Reflection -I %S/Inputs/Mirror/ -Xlinker %t/Mirror.mm.o -o %t/a.out
4+
// Note: explicitly link the CoreGraphics overlay because does not get autolinked
5+
// and it is needed for conformances on macOS < 15.
6+
// RUN: %target-build-swift -parse-stdlib %s -module-name Reflection -I %S/Inputs/Mirror/ -Xlinker %t/Mirror.mm.o -o %t/a.out -lswiftCoreGraphics
57
// RUN: %target-codesign %t/a.out
68
// RUN: %{python} %S/../Inputs/timeout.py 360 %target-run %t/a.out %S/Inputs/shuffle.jpg | %FileCheck %s
79
// FIXME: timeout wrapper is necessary because the ASan test runs for hours

utils/build-presets.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,7 @@ build-ninja
699699
# to LLVM_USE_RUNTIMES to build compiler-rt (#60993), so we can leverage
700700
# the value for SANITIZER_MIN_OSX_VERSION set in cmake_product.py
701701
extra-cmake-options=
702-
-DCLANG_COMPILER_RT_CMAKE_ARGS:STRING="-DSANITIZER_MIN_OSX_VERSION:STRING=10.13"
702+
-DCLANG_COMPILER_RT_CMAKE_ARGS:STRING="-DSANITIZER_MIN_OSX_VERSION:STRING=13.0"
703703

704704
# Do not build swift or cmark
705705
skip-build-swift

utils/build-script

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ def apply_default_arguments(toolchain, args):
424424
for target in targets
425425
if (not target.platform.is_darwin or
426426
target.platform.sdk_supports_architecture(
427-
target.arch, args.darwin_xcrun_toolchain))
427+
target.arch, args.darwin_xcrun_toolchain, args))
428428
]
429429

430430
# Include the Darwin module-only architectures in the CMake options.

utils/build-script-impl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,10 @@ KNOWN_SETTINGS=(
101101

102102
## Darwin Options
103103
darwin-crash-reporter-client "" "whether to enable CrashReporter integration, default is 1 on Darwin platforms, 0 otherwise"
104-
darwin-deployment-version-ios "11.0" "minimum deployment target version for iOS"
105-
darwin-deployment-version-osx "10.13" "minimum deployment target version for OS X"
106-
darwin-deployment-version-tvos "11.0" "minimum deployment target version for tvOS"
107-
darwin-deployment-version-watchos "4.0" "minimum deployment target version for watchOS"
104+
darwin-deployment-version-ios "16.0" "minimum deployment target version for iOS"
105+
darwin-deployment-version-osx "13.0" "minimum deployment target version for OS X"
106+
darwin-deployment-version-tvos "16.0" "minimum deployment target version for tvOS"
107+
darwin-deployment-version-watchos "9.0" "minimum deployment target version for watchOS"
108108
darwin-deployment-version-xros "1.0" "minimum deployment target version for xrOS"
109109
darwin-install-extract-symbols "" "whether to extract symbols with dsymutil during installations"
110110
darwin-install-extract-symbols-use-just-built-dsymutil "1" "whether we should extract symbols using the just built dsymutil"

0 commit comments

Comments
 (0)