Skip to content

Commit 23c3b15

Browse files
committed
Support Xcode 13 beta
* Updating availability versions * Remove all remaining overlays in stdlib/public/Darwin/*: - ObjectiveC - Dispatch - CoreFoundation - CoreGraphics - Foundation
1 parent 9b963b7 commit 23c3b15

File tree

176 files changed

+234
-46704
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

176 files changed

+234
-46704
lines changed

include/swift/AST/DiagnosticsSema.def

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4341,7 +4341,10 @@ ERROR(async_objc_dynamic_self,none,
43414341
ERROR(actor_inheritance,none,
43424342
"actor types do not support inheritance", ())
43434343

4344-
ERROR(unowned_executor_outside_actor,none,
4344+
// FIXME: This diagnostic was temporarily downgraded from an error because
4345+
// it spuriously triggers when building the Foundation module from its textual
4346+
// swiftinterface. (rdar://78932296)
4347+
WARNING(unowned_executor_outside_actor,none,
43454348
"'unownedExecutor' can only be implemented within the main "
43464349
"definition of an actor", ())
43474350
ERROR(override_implicit_unowned_executor,none,

lib/AST/Availability.cpp

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,20 @@ AvailabilityContext ASTContext::getSwift54Availability() {
413413
}
414414

415415
AvailabilityContext ASTContext::getSwift55Availability() {
416-
return getSwiftFutureAvailability();
416+
auto target = LangOpts.Target;
417+
418+
if (target.isMacOSX() ) {
419+
return AvailabilityContext(
420+
VersionRange::allGTE(llvm::VersionTuple(12, 0, 0)));
421+
} else if (target.isiOS()) {
422+
return AvailabilityContext(
423+
VersionRange::allGTE(llvm::VersionTuple(15, 0, 0)));
424+
} else if (target.isWatchOS()) {
425+
return AvailabilityContext(
426+
VersionRange::allGTE(llvm::VersionTuple(8, 0, 0)));
427+
} else {
428+
return AvailabilityContext::alwaysAvailable();
429+
}
417430
}
418431

419432

lib/Sema/TypeCheckProtocol.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4649,7 +4649,10 @@ void ConformanceChecker::resolveValueWitnesses() {
46494649
Adoptee->getClassOrBoundGenericClass() &&
46504650
Adoptee->getClassOrBoundGenericClass()->isActor()) {
46514651
witness->diagnose(diag::unowned_executor_outside_actor);
4652-
return;
4652+
// FIXME: This diagnostic was temporarily downgraded from an error to a
4653+
// warning because it spuriously triggers when building the Foundation
4654+
// module from its textual swiftinterface. (rdar://78932296)
4655+
//return;
46534656
}
46544657

46554658
// Objective-C checking for @objc requirements.

stdlib/private/OSLog/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ add_swift_target_library(swiftOSLogTestHelper
1414
OSLogPrivacy.swift
1515
OSLogFloatFormatting.swift
1616

17-
SWIFT_MODULE_DEPENDS_IOS Darwin ObjectiveC
18-
SWIFT_MODULE_DEPENDS_OSX Darwin ObjectiveC
19-
SWIFT_MODULE_DEPENDS_TVOS Darwin ObjectiveC
20-
SWIFT_MODULE_DEPENDS_WATCHOS Darwin ObjectiveC
17+
SWIFT_MODULE_DEPENDS_IOS Darwin _Concurrency
18+
SWIFT_MODULE_DEPENDS_OSX Darwin _Concurrency
19+
SWIFT_MODULE_DEPENDS_TVOS Darwin _Concurrency
20+
SWIFT_MODULE_DEPENDS_WATCHOS Darwin _Concurrency
2121
TARGET_SDKS ALL_APPLE_PLATFORMS
2222
SWIFT_COMPILE_FLAGS ${SWIFT_STANDARD_LIBRARY_SWIFT_FLAGS}
2323
INSTALL_IN_COMPONENT never_install

stdlib/private/StdlibCollectionUnittest/CheckMutableCollectionType.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -982,7 +982,7 @@ self.test("\(testNamePrefix).partition/DispatchesThroughDirectStorageAccessors")
982982
withUnsafeMutableBufferPointerIsSupported ? 1 : 0,
983983
actualWUMBPIFNonNil + actualWCMSIAIFNonNil)
984984

985-
if #available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *) {
985+
if #available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) {
986986
// `partition(by:)` is expected to dispatch to the public API in releases
987987
// that contain https://github.com/apple/swift/pull/36003.
988988
expectEqual(0, actualWUMBPIF)

stdlib/private/StdlibUnittest/CMakeLists.txt

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,17 @@ add_swift_target_library(swiftStdlibUnittest ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES}
4040
TypeIndexed.swift
4141

4242
SWIFT_MODULE_DEPENDS SwiftPrivate SwiftPrivateThreadExtras SwiftPrivateLibcExtras
43-
SWIFT_MODULE_DEPENDS_IOS Darwin Foundation
44-
SWIFT_MODULE_DEPENDS_OSX Darwin Foundation
45-
SWIFT_MODULE_DEPENDS_TVOS Darwin Foundation
46-
SWIFT_MODULE_DEPENDS_WATCHOS Darwin Foundation
47-
SWIFT_MODULE_DEPENDS_FREESTANDING Darwin
48-
SWIFT_MODULE_DEPENDS_LINUX Glibc
49-
SWIFT_MODULE_DEPENDS_FREEBSD Glibc
50-
SWIFT_MODULE_DEPENDS_OPENBSD Glibc
51-
SWIFT_MODULE_DEPENDS_CYGWIN Glibc
52-
SWIFT_MODULE_DEPENDS_HAIKU Glibc
53-
SWIFT_MODULE_DEPENDS_WINDOWS CRT WinSDK
43+
SWIFT_MODULE_DEPENDS_IOS Darwin _Concurrency
44+
SWIFT_MODULE_DEPENDS_OSX Darwin _Concurrency
45+
SWIFT_MODULE_DEPENDS_TVOS Darwin _Concurrency
46+
SWIFT_MODULE_DEPENDS_WATCHOS Darwin _Concurrency
47+
SWIFT_MODULE_DEPENDS_FREESTANDING Darwin _Concurrency
48+
SWIFT_MODULE_DEPENDS_LINUX Glibc _Concurrency
49+
SWIFT_MODULE_DEPENDS_FREEBSD Glibc _Concurrency
50+
SWIFT_MODULE_DEPENDS_OPENBSD Glibc _Concurrency
51+
SWIFT_MODULE_DEPENDS_CYGWIN Glibc _Concurrency
52+
SWIFT_MODULE_DEPENDS_HAIKU Glibc _Concurrency
53+
SWIFT_MODULE_DEPENDS_WINDOWS CRT WinSDK _Concurrency
5454
SWIFT_COMPILE_FLAGS ${swift_stdlib_unittest_compile_flags} ${SWIFT_STANDARD_LIBRARY_SWIFT_FLAGS}
5555
INSTALL_IN_COMPONENT stdlib-experimental
5656
DARWIN_INSTALL_NAME_DIR "${SWIFT_DARWIN_STDLIB_PRIVATE_INSTALL_NAME_DIR}"

stdlib/private/StdlibUnittestFoundationExtras/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ add_swift_target_library(swiftStdlibUnittestFoundationExtras ${SWIFT_STDLIB_LIBR
44
StdlibUnittestFoundationExtras.swift
55
UnavailableFoundationMethodThunks.mm
66

7-
SWIFT_MODULE_DEPENDS Foundation StdlibUnittest
7+
SWIFT_MODULE_DEPENDS StdlibUnittest
88
SWIFT_COMPILE_FLAGS ${SWIFT_STANDARD_LIBRARY_SWIFT_FLAGS}
99
INSTALL_IN_COMPONENT stdlib-experimental
1010
DARWIN_INSTALL_NAME_DIR "${SWIFT_DARWIN_STDLIB_PRIVATE_INSTALL_NAME_DIR}")

stdlib/public/CMakeLists.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,8 @@ if(SWIFT_BUILD_SDK_OVERLAY OR SWIFT_BUILD_TEST_SUPPORT_MODULES)
113113
endif()
114114

115115
if(SWIFT_BUILD_SDK_OVERLAY)
116-
list_intersect("${SWIFT_APPLE_PLATFORMS}" "${SWIFT_SDKS}" building_darwin_sdks)
117-
if(building_darwin_sdks)
118-
add_subdirectory(Darwin)
119-
endif()
116+
# On Apple platforms, we aren't building any overlays (other than Darwin in
117+
# Platform above). Instead, we're picking them up from the SDK.
120118

121119
if(WINDOWS IN_LIST SWIFT_SDKS)
122120
add_subdirectory(Windows)

stdlib/public/Concurrency/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ add_swift_target_library(swift_Concurrency ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} I
9696
-parse-stdlib
9797
-Xfrontend -enable-experimental-concurrency
9898
-Xfrontend -define-availability
99-
-Xfrontend \"SwiftStdlib 5.5:macOS 9999, iOS 9999, watchOS 9999, tvOS 9999\"
99+
-Xfrontend \"SwiftStdlib 5.5:macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0\"
100100
LINK_FLAGS "${SWIFT_RUNTIME_SWIFT_LINK_FLAGS}"
101101
INSTALL_IN_COMPONENT stdlib
102102
)

stdlib/public/Darwin/CMakeLists.txt

Lines changed: 0 additions & 34 deletions
This file was deleted.

stdlib/public/Darwin/CoreFoundation/CMakeLists.txt

Lines changed: 0 additions & 17 deletions
This file was deleted.

stdlib/public/Darwin/CoreFoundation/CoreFoundation.swift

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)