Skip to content

[main] Support Xcode 13 beta #37823

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion include/swift/AST/DiagnosticsSema.def
Original file line number Diff line number Diff line change
Expand Up @@ -4341,7 +4341,10 @@ ERROR(async_objc_dynamic_self,none,
ERROR(actor_inheritance,none,
"actor types do not support inheritance", ())

ERROR(unowned_executor_outside_actor,none,
// FIXME: This diagnostic was temporarily downgraded from an error because
// it spuriously triggers when building the Foundation module from its textual
// swiftinterface. (rdar://78932296)
WARNING(unowned_executor_outside_actor,none,
"'unownedExecutor' can only be implemented within the main "
"definition of an actor", ())
ERROR(override_implicit_unowned_executor,none,
Expand Down
15 changes: 14 additions & 1 deletion lib/AST/Availability.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,20 @@ AvailabilityContext ASTContext::getSwift54Availability() {
}

AvailabilityContext ASTContext::getSwift55Availability() {
return getSwiftFutureAvailability();
auto target = LangOpts.Target;

if (target.isMacOSX() ) {
return AvailabilityContext(
VersionRange::allGTE(llvm::VersionTuple(12, 0, 0)));
} else if (target.isiOS()) {
return AvailabilityContext(
VersionRange::allGTE(llvm::VersionTuple(15, 0, 0)));
} else if (target.isWatchOS()) {
return AvailabilityContext(
VersionRange::allGTE(llvm::VersionTuple(8, 0, 0)));
} else {
return AvailabilityContext::alwaysAvailable();
}
}


Expand Down
5 changes: 4 additions & 1 deletion lib/Sema/TypeCheckProtocol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4649,7 +4649,10 @@ void ConformanceChecker::resolveValueWitnesses() {
Adoptee->getClassOrBoundGenericClass() &&
Adoptee->getClassOrBoundGenericClass()->isActor()) {
witness->diagnose(diag::unowned_executor_outside_actor);
return;
// FIXME: This diagnostic was temporarily downgraded from an error to a
// warning because it spuriously triggers when building the Foundation
// module from its textual swiftinterface. (rdar://78932296)
//return;
}

// Objective-C checking for @objc requirements.
Expand Down
8 changes: 4 additions & 4 deletions stdlib/private/OSLog/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ add_swift_target_library(swiftOSLogTestHelper
OSLogPrivacy.swift
OSLogFloatFormatting.swift

SWIFT_MODULE_DEPENDS_IOS Darwin ObjectiveC
SWIFT_MODULE_DEPENDS_OSX Darwin ObjectiveC
SWIFT_MODULE_DEPENDS_TVOS Darwin ObjectiveC
SWIFT_MODULE_DEPENDS_WATCHOS Darwin ObjectiveC
SWIFT_MODULE_DEPENDS_IOS Darwin _Concurrency
SWIFT_MODULE_DEPENDS_OSX Darwin _Concurrency
SWIFT_MODULE_DEPENDS_TVOS Darwin _Concurrency
SWIFT_MODULE_DEPENDS_WATCHOS Darwin _Concurrency
TARGET_SDKS ALL_APPLE_PLATFORMS
SWIFT_COMPILE_FLAGS ${SWIFT_STANDARD_LIBRARY_SWIFT_FLAGS}
INSTALL_IN_COMPONENT never_install
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,7 @@ self.test("\(testNamePrefix).partition/DispatchesThroughDirectStorageAccessors")
withUnsafeMutableBufferPointerIsSupported ? 1 : 0,
actualWUMBPIFNonNil + actualWCMSIAIFNonNil)

if #available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *) {
if #available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) {
// `partition(by:)` is expected to dispatch to the public API in releases
// that contain https://github.com/apple/swift/pull/36003.
expectEqual(0, actualWUMBPIF)
Expand Down
22 changes: 11 additions & 11 deletions stdlib/private/StdlibUnittest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,17 @@ add_swift_target_library(swiftStdlibUnittest ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES}
TypeIndexed.swift

SWIFT_MODULE_DEPENDS SwiftPrivate SwiftPrivateThreadExtras SwiftPrivateLibcExtras
SWIFT_MODULE_DEPENDS_IOS Darwin Foundation
SWIFT_MODULE_DEPENDS_OSX Darwin Foundation
SWIFT_MODULE_DEPENDS_TVOS Darwin Foundation
SWIFT_MODULE_DEPENDS_WATCHOS Darwin Foundation
SWIFT_MODULE_DEPENDS_FREESTANDING Darwin
SWIFT_MODULE_DEPENDS_LINUX Glibc
SWIFT_MODULE_DEPENDS_FREEBSD Glibc
SWIFT_MODULE_DEPENDS_OPENBSD Glibc
SWIFT_MODULE_DEPENDS_CYGWIN Glibc
SWIFT_MODULE_DEPENDS_HAIKU Glibc
SWIFT_MODULE_DEPENDS_WINDOWS CRT WinSDK
SWIFT_MODULE_DEPENDS_IOS Darwin _Concurrency
SWIFT_MODULE_DEPENDS_OSX Darwin _Concurrency
SWIFT_MODULE_DEPENDS_TVOS Darwin _Concurrency
SWIFT_MODULE_DEPENDS_WATCHOS Darwin _Concurrency
SWIFT_MODULE_DEPENDS_FREESTANDING Darwin _Concurrency
SWIFT_MODULE_DEPENDS_LINUX Glibc _Concurrency
SWIFT_MODULE_DEPENDS_FREEBSD Glibc _Concurrency
SWIFT_MODULE_DEPENDS_OPENBSD Glibc _Concurrency
SWIFT_MODULE_DEPENDS_CYGWIN Glibc _Concurrency
SWIFT_MODULE_DEPENDS_HAIKU Glibc _Concurrency
SWIFT_MODULE_DEPENDS_WINDOWS CRT WinSDK _Concurrency
SWIFT_COMPILE_FLAGS ${swift_stdlib_unittest_compile_flags} ${SWIFT_STANDARD_LIBRARY_SWIFT_FLAGS}
INSTALL_IN_COMPONENT stdlib-experimental
DARWIN_INSTALL_NAME_DIR "${SWIFT_DARWIN_STDLIB_PRIVATE_INSTALL_NAME_DIR}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ add_swift_target_library(swiftStdlibUnittestFoundationExtras ${SWIFT_STDLIB_LIBR
StdlibUnittestFoundationExtras.swift
UnavailableFoundationMethodThunks.mm

SWIFT_MODULE_DEPENDS Foundation StdlibUnittest
SWIFT_MODULE_DEPENDS StdlibUnittest
SWIFT_COMPILE_FLAGS ${SWIFT_STANDARD_LIBRARY_SWIFT_FLAGS}
INSTALL_IN_COMPONENT stdlib-experimental
DARWIN_INSTALL_NAME_DIR "${SWIFT_DARWIN_STDLIB_PRIVATE_INSTALL_NAME_DIR}")
Expand Down
6 changes: 2 additions & 4 deletions stdlib/public/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,8 @@ if(SWIFT_BUILD_SDK_OVERLAY OR SWIFT_BUILD_TEST_SUPPORT_MODULES)
endif()

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

if(WINDOWS IN_LIST SWIFT_SDKS)
add_subdirectory(Windows)
Expand Down
2 changes: 1 addition & 1 deletion stdlib/public/Concurrency/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ add_swift_target_library(swift_Concurrency ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} I
-parse-stdlib
-Xfrontend -enable-experimental-concurrency
-Xfrontend -define-availability
-Xfrontend \"SwiftStdlib 5.5:macOS 9999, iOS 9999, watchOS 9999, tvOS 9999\"
-Xfrontend \"SwiftStdlib 5.5:macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0\"
LINK_FLAGS "${SWIFT_RUNTIME_SWIFT_LINK_FLAGS}"
INSTALL_IN_COMPONENT stdlib
)
34 changes: 0 additions & 34 deletions stdlib/public/Darwin/CMakeLists.txt

This file was deleted.

17 changes: 0 additions & 17 deletions stdlib/public/Darwin/CoreFoundation/CMakeLists.txt

This file was deleted.

26 changes: 0 additions & 26 deletions stdlib/public/Darwin/CoreFoundation/CoreFoundation.swift

This file was deleted.

Loading