Skip to content

Commit d20a7ca

Browse files
authored
[CMake] Switch to building the overlays in Swift 5 mode (#24350)
Now that that's stabilized, we don't have to keep them in Swift 4 mode any longer. (Arguably we don't need the CMake variable at all, but it may be useful again in the future.) rdar://problem/49040980
1 parent 9b6ba43 commit d20a7ca

File tree

9 files changed

+16
-16
lines changed

9 files changed

+16
-16
lines changed

cmake/modules/SwiftSource.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ function(_compile_swift_files
260260

261261
# Force swift 4 compatibility mode for overlays.
262262
if (SWIFTFILE_IS_SDK_OVERLAY)
263-
list(APPEND swift_flags "-swift-version" "4")
263+
list(APPEND swift_flags "-swift-version" "5")
264264
endif()
265265

266266
if(SWIFTFILE_IS_SDK_OVERLAY)

stdlib/public/Darwin/AppKit/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ add_swift_target_library(swiftAppKit ${SWIFT_SDK_OVERLAY_LIBRARY_BUILD_TYPES} IS
1111

1212
"${SWIFT_SOURCE_DIR}/stdlib/linker-support/magic-symbols-for-install-name.c"
1313

14-
SWIFT_COMPILE_FLAGS ${SWIFT_RUNTIME_SWIFT_COMPILE_FLAGS} -swift-version 4
14+
SWIFT_COMPILE_FLAGS ${SWIFT_RUNTIME_SWIFT_COMPILE_FLAGS}
1515
LINK_FLAGS "${SWIFT_RUNTIME_SWIFT_LINK_FLAGS}"
1616
TARGET_SDKS OSX
1717
SWIFT_MODULE_DEPENDS_OSX Darwin CoreData CoreGraphics CoreImage Dispatch Foundation IOKit ObjectiveC QuartzCore XPC # auto-updated

stdlib/public/Darwin/CloudKit/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ add_swift_target_library(swiftCloudKit ${SWIFT_SDK_OVERLAY_LIBRARY_BUILD_TYPES}
1616
CKRecordValue.swift
1717
DefaultParameters.swift
1818

19-
SWIFT_COMPILE_FLAGS "${SWIFT_RUNTIME_SWIFT_COMPILE_FLAGS}" "-swift-version" "4.2"
19+
SWIFT_COMPILE_FLAGS "${SWIFT_RUNTIME_SWIFT_COMPILE_FLAGS}"
2020
LINK_FLAGS "${SWIFT_RUNTIME_SWIFT_LINK_FLAGS}"
2121
TARGET_SDKS OSX IOS IOS_SIMULATOR TVOS TVOS_SIMULATOR WATCHOS WATCHOS_SIMULATOR
2222

stdlib/public/Darwin/CoreImage/CoreImage.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ extension CIFilter {
3838
for (key, value) in elements {
3939
dict[key] = value
4040
}
41-
self.init(name: name, withInputParameters: dict)
41+
self.init(name: name, parameters: dict)
4242
}
4343
}
4444

stdlib/public/Darwin/CoreMedia/CMTime.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414

1515
extension CMTime {
1616
public init(seconds: Double, preferredTimescale: CMTimeScale) {
17-
self = CMTimeMakeWithSeconds(seconds, preferredTimescale)
17+
self = CMTimeMakeWithSeconds(seconds, preferredTimescale: preferredTimescale)
1818
}
1919

2020
public init(value: CMTimeValue, timescale: CMTimeScale) {
21-
self = CMTimeMake(value, timescale)
21+
self = CMTimeMake(value: value, timescale: timescale)
2222
}
2323
}
2424

@@ -67,7 +67,7 @@ extension CMTime {
6767

6868
public func convertScale(_ newTimescale: Int32, method: CMTimeRoundingMethod)
6969
-> CMTime {
70-
return CMTimeConvertScale(self, newTimescale, method)
70+
return CMTimeConvertScale(self, timescale: newTimescale, method: method)
7171
}
7272
}
7373

stdlib/public/Darwin/CoreMedia/CMTimeRange.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
// CMTimeRangeFromTimeToTime
2525
extension CMTimeRange {
2626
public init(start: CMTime, end: CMTime) {
27-
self = CMTimeRangeFromTimeToTime(start, end)
27+
self = CMTimeRangeFromTimeToTime(start: start, end: end)
2828
}
2929

3030
public var isValid: Bool {
@@ -40,24 +40,24 @@ extension CMTimeRange {
4040
}
4141

4242
public var isEmpty: Bool {
43-
return self.isValid && (self.duration == kCMTimeZero)
43+
return self.isValid && (self.duration == .zero)
4444
}
4545

4646
public var end: CMTime {
4747
return CMTimeRangeGetEnd(self)
4848
}
4949

5050
public func union(_ otherRange: CMTimeRange) -> CMTimeRange {
51-
return CMTimeRangeGetUnion(self, otherRange)
51+
return CMTimeRangeGetUnion(self, otherRange: otherRange)
5252
}
5353
public func intersection(_ otherRange: CMTimeRange) -> CMTimeRange {
54-
return CMTimeRangeGetIntersection(self, otherRange)
54+
return CMTimeRangeGetIntersection(self, otherRange: otherRange)
5555
}
5656
public func containsTime(_ time: CMTime) -> Bool {
57-
return CMTimeRangeContainsTime(self, time)
57+
return CMTimeRangeContainsTime(self, time: time)
5858
}
5959
public func containsTimeRange(_ range: CMTimeRange) -> Bool {
60-
return CMTimeRangeContainsTimeRange(self, range)
60+
return CMTimeRangeContainsTimeRange(self, otherRange: range)
6161
}
6262
}
6363

stdlib/public/Darwin/Foundation/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ add_swift_target_library(swiftFoundation ${SWIFT_SDK_OVERLAY_LIBRARY_BUILD_TYPES
6868
GYB_SOURCES
6969
NSValue.swift.gyb
7070

71-
SWIFT_COMPILE_FLAGS "${SWIFT_RUNTIME_SWIFT_COMPILE_FLAGS}" "-Xllvm" "-sil-inline-generics" "-Xllvm" "-sil-partial-specialization" "-swift-version" "5"
71+
SWIFT_COMPILE_FLAGS "${SWIFT_RUNTIME_SWIFT_COMPILE_FLAGS}" "-Xllvm" "-sil-inline-generics" "-Xllvm" "-sil-partial-specialization"
7272
LINK_FLAGS "${SWIFT_RUNTIME_SWIFT_LINK_FLAGS}"
7373

7474
SWIFT_MODULE_DEPENDS_OSX Darwin CoreFoundation CoreGraphics Dispatch IOKit ObjectiveC # auto-updated

stdlib/public/Darwin/UIKit/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ add_swift_target_library(swiftUIKit ${SWIFT_SDK_OVERLAY_LIBRARY_BUILD_TYPES} IS_
1010
GYB_SOURCES
1111
UIKit_FoundationExtensions.swift.gyb
1212

13-
SWIFT_COMPILE_FLAGS ${SWIFT_RUNTIME_SWIFT_COMPILE_FLAGS} -swift-version 4.2
13+
SWIFT_COMPILE_FLAGS ${SWIFT_RUNTIME_SWIFT_COMPILE_FLAGS}
1414
LINK_FLAGS "${SWIFT_RUNTIME_SWIFT_LINK_FLAGS}"
1515
TARGET_SDKS IOS IOS_SIMULATOR TVOS TVOS_SIMULATOR WATCHOS WATCHOS_SIMULATOR
1616
SWIFT_MODULE_DEPENDS_IOS Darwin CoreFoundation CoreGraphics CoreImage Dispatch Foundation ObjectiveC QuartzCore os # auto-updated

stdlib/public/Darwin/UIKit/UIKit.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ internal struct _UIViewQuickLookState {
298298
static var views = Set<UIView>()
299299
}
300300

301-
extension UIView : _DefaultCustomPlaygroundQuickLookable {
301+
extension UIView : __DefaultCustomPlaygroundQuickLookable {
302302
@available(*, deprecated, message: "UIView._defaultCustomPlaygroundQuickLook will be removed in a future Swift version")
303303
public var _defaultCustomPlaygroundQuickLook: PlaygroundQuickLook {
304304
if _UIViewQuickLookState.views.contains(self) {

0 commit comments

Comments
 (0)