Skip to content

Commit c5ff1f2

Browse files
committed
Update master to build with Xcode 9 beta 1, OS X 10.13, iOS 11, tvOS 11, and watchOS 4 SDKs.
1 parent a31e2bd commit c5ff1f2

File tree

78 files changed

+2856
-584
lines changed

Some content is hidden

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

78 files changed

+2856
-584
lines changed

Diff for: apinotes/Accelerate.apinotes

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
Name: Accelerate
2+
Enumerators:
3+
- Name: BNNSDataTypeFloatBit
4+
Availability: nonswift
5+
- Name: BNNSDataTypeIntBit
6+
Availability: nonswift
7+
- Name: BNNSDataTypeUIntBit
8+
Availability: nonswift
9+
- Name: BNNSDataTypeIndexedBit
10+
Availability: nonswift
11+
- Name: BNNSDataTypeFloat16
12+
SwiftPrivate: true
13+
- Name: BNNSDataTypeFloat32
14+
SwiftPrivate: true
15+
- Name: BNNSDataTypeInt8
16+
SwiftPrivate: true
17+
- Name: BNNSDataTypeInt16
18+
SwiftPrivate: true
19+
- Name: BNNSDataTypeInt32
20+
SwiftPrivate: true
21+
- Name: BNNSDataTypeUInt8
22+
SwiftPrivate: true
23+
- Name: BNNSDataTypeUInt16
24+
SwiftPrivate: true
25+
- Name: BNNSDataTypeUInt32
26+
SwiftPrivate: true
27+
- Name: BNNSDataTypeIndexed8
28+
SwiftPrivate: true
29+
30+
- Name: BNNSPoolingFunctionMax
31+
SwiftPrivate: true
32+
- Name: BNNSPoolingFunctionAverage
33+
SwiftPrivate: true
34+
35+
- Name: BNNSActivationFunctionIdentity
36+
SwiftPrivate: true
37+
- Name: BNNSActivationFunctionRectifiedLinear
38+
SwiftPrivate: true
39+
- Name: BNNSActivationFunctionLeakyRectifiedLinear
40+
SwiftPrivate: true
41+
- Name: BNNSActivationFunctionSigmoid
42+
SwiftPrivate: true
43+
- Name: BNNSActivationFunctionTanh
44+
SwiftPrivate: true
45+
- Name: BNNSActivationFunctionScaledTanh
46+
SwiftPrivate: true
47+
- Name: BNNSActivationFunctionAbs
48+
SwiftPrivate: true
49+
- Name: BNNSActivationFunctionLinear
50+
SwiftPrivate: true
51+
- Name: BNNSActivationFunctionClamp
52+
SwiftPrivate: true
53+
- Name: BNNSActivationFunctionIntegerLinearSaturate
54+
SwiftPrivate: true
55+
- Name: BNNSActivationFunctionIntegerLinearSaturatePerChannel
56+
SwiftPrivate: true
57+
- Name: BNNSActivationFunctionSoftmax
58+
SwiftPrivate: true
59+
60+
- Name: BNNSFlagsUseClientPtr
61+
SwiftPrivate: true

Diff for: apinotes/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
set(SWIFT_API_NOTES_INPUTS
2+
Accelerate
23
AVFoundation
34
AVKit
45
AppKit

Diff for: apinotes/Dispatch.apinotes

+2
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ Protocols:
9191
SwiftName: DispatchSourceUserDataOr
9292
- Name: OS_dispatch_source_data_add
9393
SwiftName: DispatchSourceUserDataAdd
94+
- Name: OS_dispatch_source_data_replace
95+
SwiftName: DispatchSourceUserDataReplace
9496
- Name: OS_dispatch_source_vnode
9597
SwiftName: DispatchSourceFileSystemObject
9698
- Name: OS_dispatch_source_write

Diff for: cmake/modules/DarwinSDKs.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ is_sdk_requested(IOS_SIMULATOR swift_build_ios_simulator)
2525
if(swift_build_ios_simulator)
2626
configure_sdk_darwin(
2727
IOS_SIMULATOR "iOS Simulator" "${SWIFT_DARWIN_DEPLOYMENT_VERSION_IOS}"
28-
iphonesimulator ios-simulator ios "i386;x86_64")
28+
iphonesimulator ios-simulator ios "x86_64")
2929
configure_target_variant(
3030
IOS_SIMULATOR-DA "iOS Debug+Asserts" IOS_SIMULATOR DA "Debug+Asserts")
3131
configure_target_variant(

Diff for: include/swift/AST/DiagnosticsDriver.def

+2
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ ERROR(error_os_minimum_deployment,none,
101101
"Swift requires a minimum deployment target of %0", (StringRef))
102102
ERROR(error_sdk_too_old,none,
103103
"Swift does not support the SDK '%0'", (StringRef))
104+
ERROR(error_ios_maximum_deployment_32,none,
105+
"iOS %0 does not support 32-bit programs", (unsigned))
104106

105107
ERROR(error_two_files_same_name,none,
106108
"filename \"%0\" used twice: '%1' and '%2'",

Diff for: lib/Driver/Driver.cpp

+7-3
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,10 @@ static void validateArgs(DiagnosticEngine &diags, const ArgList &Args) {
142142
if (triple.isOSVersionLT(7))
143143
diags.diagnose(SourceLoc(), diag::error_os_minimum_deployment,
144144
"iOS 7");
145+
if (triple.isArch32Bit() && !triple.isOSVersionLT(11)) {
146+
diags.diagnose(SourceLoc(), diag::error_ios_maximum_deployment_32,
147+
triple.getOSMajorVersion());
148+
}
145149
} else if (triple.isWatchOS()) {
146150
if (triple.isOSVersionLT(2, 0)) {
147151
diags.diagnose(SourceLoc(), diag::error_os_minimum_deployment,
@@ -1034,14 +1038,14 @@ static bool isSDKTooOld(StringRef sdkPath, clang::VersionTuple minVersion,
10341038
/// the given target.
10351039
static bool isSDKTooOld(StringRef sdkPath, const llvm::Triple &target) {
10361040
if (target.isMacOSX()) {
1037-
return isSDKTooOld(sdkPath, clang::VersionTuple(10, 12), "OSX");
1041+
return isSDKTooOld(sdkPath, clang::VersionTuple(10, 13), "OSX");
10381042

10391043
} else if (target.isiOS()) {
10401044
// Includes both iOS and TVOS.
1041-
return isSDKTooOld(sdkPath, clang::VersionTuple(10, 0), "Simulator", "OS");
1045+
return isSDKTooOld(sdkPath, clang::VersionTuple(11, 0), "Simulator", "OS");
10421046

10431047
} else if (target.isWatchOS()) {
1044-
return isSDKTooOld(sdkPath, clang::VersionTuple(3, 0), "Simulator", "OS");
1048+
return isSDKTooOld(sdkPath, clang::VersionTuple(4, 0), "Simulator", "OS");
10451049

10461050
} else {
10471051
return false;

Diff for: stdlib/public/SDK/ARKit/ARKit.swift

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// This source file is part of the Swift.org open source project
4+
//
5+
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
6+
// Licensed under Apache License v2.0 with Runtime Library Exception
7+
//
8+
// See https://swift.org/LICENSE.txt for license information
9+
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10+
//
11+
//===----------------------------------------------------------------------===//
12+
13+
@_exported import ARKit
14+
15+
@available(iOS, introduced: 11.0)
16+
extension ARCamera {
17+
/**
18+
A value describing the camera's tracking state.
19+
*/
20+
public enum TrackingState {
21+
public enum Reason {
22+
/** Tracking is limited due to a excessive motion of the camera. */
23+
case excessiveMotion
24+
25+
/** Tracking is limited due to a lack of features visible to the camera. */
26+
case insufficientFeatures
27+
}
28+
29+
/** Tracking is not available. */
30+
case notAvailable
31+
32+
/** Tracking is limited. See tracking reason for details. */
33+
case limited(Reason)
34+
35+
/** Tracking is normal. */
36+
case normal
37+
}
38+
39+
/**
40+
The tracking state of the camera.
41+
*/
42+
public var trackingState: TrackingState {
43+
switch __trackingState {
44+
case .notAvailable: return .notAvailable
45+
case .normal: return .normal
46+
case .limited:
47+
let reason: TrackingState.Reason
48+
49+
switch __trackingStateReason {
50+
case .excessiveMotion: reason = .excessiveMotion
51+
default: reason = .insufficientFeatures
52+
}
53+
54+
return .limited(reason)
55+
}
56+
}
57+
}

Diff for: stdlib/public/SDK/ARKit/CMakeLists.txt

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
cmake_minimum_required(VERSION 3.4.3)
2+
include("../../../../cmake/modules/StandaloneOverlay.cmake")
3+
4+
add_swift_library(swiftARKit ${SWIFT_SDK_OVERLAY_LIBRARY_BUILD_TYPES} IS_SDK_OVERLAY
5+
ARKit.swift
6+
7+
SWIFT_COMPILE_FLAGS "${SWIFT_RUNTIME_SWIFT_COMPILE_FLAGS}"
8+
LINK_FLAGS "${SWIFT_RUNTIME_SWIFT_LINK_FLAGS}"
9+
TARGET_SDKS IOS IOS_SIMULATOR
10+
SWIFT_MODULE_DEPENDS_IOS Darwin AVFoundation CoreAudio CoreFoundation CoreGraphics CoreImage CoreMedia Dispatch Foundation GLKit ObjectiveC QuartzCore SceneKit simd SpriteKit UIKit # auto-updated
11+
FRAMEWORK_DEPENDS_WEAK ARKit
12+
13+
DEPLOYMENT_VERSION_IOS ${SWIFTLIB_DEPLOYMENT_VERSION_ARKIT_IOS}
14+
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// This source file is part of the Swift.org open source project
4+
//
5+
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
6+
// Licensed under Apache License v2.0 with Runtime Library Exception
7+
//
8+
// See https://swift.org/LICENSE.txt for license information
9+
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10+
//
11+
//===----------------------------------------------------------------------===//
12+
13+
@_exported import AVFoundation // Clang module
14+
import Foundation
15+
16+
17+
#if os(iOS)
18+
@available(iOS, introduced: 11.0)
19+
extension AVCaptureSynchronizedDataCollection : Sequence {
20+
public func makeIterator() -> Iterator {
21+
return Iterator(self)
22+
}
23+
24+
public struct Iterator : IteratorProtocol {
25+
internal var fastIterator: NSFastEnumerationIterator
26+
27+
internal init(_ collection: AVCaptureSynchronizedDataCollection) {
28+
self.fastIterator = NSFastEnumerationIterator(collection)
29+
}
30+
31+
public mutating func next() -> AVCaptureSynchronizedData? {
32+
guard let nextAny = fastIterator.next() else { return nil }
33+
return nextAny as! AVCaptureSynchronizedData
34+
}
35+
}
36+
}
37+
38+
#endif

Diff for: stdlib/public/SDK/AVFoundation/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 3.4.3)
22
include("../../../../cmake/modules/StandaloneOverlay.cmake")
33

44
add_swift_library(swiftAVFoundation ${SWIFT_SDK_OVERLAY_LIBRARY_BUILD_TYPES} IS_SDK_OVERLAY
5+
AVCaptureSynchronizedDataCollection.swift
56
AVError.swift
67
NSValue.swift.gyb
78

0 commit comments

Comments
 (0)