Skip to content

Commit f780977

Browse files
authored
Merge pull request swiftlang#37824 from apple/xcode-13-beta-5.5
[5.5] Support Xcode 13 beta
2 parents 7a348c6 + d53b720 commit f780977

File tree

182 files changed

+241
-48200
lines changed

Some content is hidden

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

182 files changed

+241
-48200
lines changed

cmake/modules/AddSwiftUnittests.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ function(add_swift_unittest test_dirname)
4242
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
4343
# Add an @rpath to the swift library directory.
4444
set_target_properties(${test_dirname} PROPERTIES
45-
BUILD_RPATH ${SWIFT_LIBRARY_OUTPUT_INTDIR}/swift/macosx)
45+
BUILD_RPATH "${SWIFT_LIBRARY_OUTPUT_INTDIR}/swift/macosx;${SWIFT_DARWIN_STDLIB_INSTALL_NAME_DIR}")
4646
# Force all the swift libraries to be found via rpath.
4747
add_custom_command(TARGET "${test_dirname}" POST_BUILD
4848
COMMAND "${SWIFT_SOURCE_DIR}/utils/swift-rpathize.py"

include/swift/AST/DiagnosticsSema.def

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

4365-
ERROR(unowned_executor_outside_actor,none,
4365+
// FIXME: This diagnostic was temporarily downgraded from an error because
4366+
// it spuriously triggers when building the Foundation module from its textual
4367+
// swiftinterface. (rdar://78932296)
4368+
WARNING(unowned_executor_outside_actor,none,
43664369
"'unownedExecutor' can only be implemented within the main "
43674370
"definition of an actor", ())
43684371
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
@@ -4578,7 +4578,10 @@ void ConformanceChecker::resolveValueWitnesses() {
45784578
Adoptee->getClassOrBoundGenericClass() &&
45794579
Adoptee->getClassOrBoundGenericClass()->isActor()) {
45804580
witness->diagnose(diag::unowned_executor_outside_actor);
4581-
return;
4581+
// FIXME: This diagnostic was temporarily downgraded from an error to a
4582+
// warning because it spuriously triggers when building the Foundation
4583+
// module from its textual swiftinterface. (rdar://78932296)
4584+
//return;
45824585
}
45834586

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

stdlib/cmake/modules/AddSwiftStdlib.cmake

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -965,11 +965,6 @@ function(_add_swift_target_library_single target name)
965965
endif()
966966
endif()
967967

968-
# Always use @rpath for XCTest
969-
if(module_name STREQUAL "XCTest")
970-
set(install_name_dir "@rpath")
971-
endif()
972-
973968
if(SWIFTLIB_SINGLE_DARWIN_INSTALL_NAME_DIR)
974969
set(install_name_dir "${SWIFTLIB_SINGLE_DARWIN_INSTALL_NAME_DIR}")
975970
endif()
@@ -1914,9 +1909,7 @@ function(add_swift_target_library name)
19141909
# These paths must come before their normal counterparts so that when compiling
19151910
# macCatalyst-only or unzippered-twin overlays the macCatalyst version
19161911
# of a framework is found and not the Mac version.
1917-
if(maccatalyst_build_flavor STREQUAL "ios-like"
1918-
OR (name STREQUAL "swiftXCTest"
1919-
AND maccatalyst_build_flavor STREQUAL "zippered"))
1912+
if(maccatalyst_build_flavor STREQUAL "ios-like")
19201913

19211914
# The path to find iOS-only frameworks (such as UIKit) under macCatalyst.
19221915
set(ios_support_frameworks_path "${SWIFT_SDK_${sdk}_PATH}/System/iOSSupport/System/Library/Frameworks/")

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
@@ -37,17 +37,17 @@ add_swift_target_library(swiftStdlibUnittest ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES}
3737
TypeIndexed.swift
3838

3939
SWIFT_MODULE_DEPENDS SwiftPrivate SwiftPrivateThreadExtras SwiftPrivateLibcExtras
40-
SWIFT_MODULE_DEPENDS_IOS Darwin Foundation
41-
SWIFT_MODULE_DEPENDS_OSX Darwin Foundation
42-
SWIFT_MODULE_DEPENDS_TVOS Darwin Foundation
43-
SWIFT_MODULE_DEPENDS_WATCHOS Darwin Foundation
44-
SWIFT_MODULE_DEPENDS_FREESTANDING Darwin
45-
SWIFT_MODULE_DEPENDS_LINUX Glibc
46-
SWIFT_MODULE_DEPENDS_FREEBSD Glibc
47-
SWIFT_MODULE_DEPENDS_OPENBSD Glibc
48-
SWIFT_MODULE_DEPENDS_CYGWIN Glibc
49-
SWIFT_MODULE_DEPENDS_HAIKU Glibc
50-
SWIFT_MODULE_DEPENDS_WINDOWS CRT WinSDK
40+
SWIFT_MODULE_DEPENDS_IOS Darwin _Concurrency
41+
SWIFT_MODULE_DEPENDS_OSX Darwin _Concurrency
42+
SWIFT_MODULE_DEPENDS_TVOS Darwin _Concurrency
43+
SWIFT_MODULE_DEPENDS_WATCHOS Darwin _Concurrency
44+
SWIFT_MODULE_DEPENDS_FREESTANDING Darwin _Concurrency
45+
SWIFT_MODULE_DEPENDS_LINUX Glibc _Concurrency
46+
SWIFT_MODULE_DEPENDS_FREEBSD Glibc _Concurrency
47+
SWIFT_MODULE_DEPENDS_OPENBSD Glibc _Concurrency
48+
SWIFT_MODULE_DEPENDS_CYGWIN Glibc _Concurrency
49+
SWIFT_MODULE_DEPENDS_HAIKU Glibc _Concurrency
50+
SWIFT_MODULE_DEPENDS_WINDOWS CRT WinSDK _Concurrency
5151
SWIFT_COMPILE_FLAGS ${swift_stdlib_unittest_compile_flags} ${SWIFT_STANDARD_LIBRARY_SWIFT_FLAGS}
5252
INSTALL_IN_COMPONENT stdlib-experimental
5353
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
@@ -109,10 +109,8 @@ if(SWIFT_BUILD_SDK_OVERLAY OR SWIFT_BUILD_TEST_SUPPORT_MODULES)
109109
endif()
110110

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

117115
if(WINDOWS IN_LIST SWIFT_SDKS)
118116
add_subdirectory(Windows)

0 commit comments

Comments
 (0)