Skip to content

Update master to build with Xcode 9 beta 4 #11248

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 2 commits into from
Jul 28, 2017
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
10 changes: 9 additions & 1 deletion cmake/modules/AddSwift.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1553,9 +1553,17 @@ function(add_swift_library name)
endif()

# Add PrivateFrameworks, rdar://28466433
set(swiftlib_link_flags_all ${SWIFTLIB_LINK_FLAGS})
if(SWIFTLIB_IS_SDK_OVERLAY)
list(APPEND swiftlib_swift_compile_flags_all "-Fsystem" "${SWIFT_SDK_${sdk}_PATH}/System/Library/PrivateFrameworks/")
endif()

if("${sdk}" STREQUAL "IOS_SIMULATOR")
if("${name}" STREQUAL "swiftMediaPlayer")
message("DISABLING AUTOLINK FOR swiftMediaPlayer")
list(APPEND swiftlib_link_flags_all "-Xlinker" "-ignore_auto_link")
endif()
endif()

# Add this library variant.
_add_swift_library_single(
Expand All @@ -1576,7 +1584,7 @@ function(add_swift_library name)
FILE_DEPENDS ${SWIFTLIB_FILE_DEPENDS} ${swiftlib_module_dependency_targets}
C_COMPILE_FLAGS ${SWIFTLIB_C_COMPILE_FLAGS}
SWIFT_COMPILE_FLAGS ${swiftlib_swift_compile_flags_all}
LINK_FLAGS ${SWIFTLIB_LINK_FLAGS}
LINK_FLAGS ${swiftlib_link_flags_all}
PRIVATE_LINK_LIBRARIES ${swiftlib_private_link_libraries_targets}
INCORPORATE_OBJECT_LIBRARIES ${SWIFTLIB_INCORPORATE_OBJECT_LIBRARIES}
INCORPORATE_OBJECT_LIBRARIES_SHARED_ONLY ${SWIFTLIB_INCORPORATE_OBJECT_LIBRARIES_SHARED_ONLY}
Expand Down
4 changes: 4 additions & 0 deletions stdlib/public/SDK/ARKit/ARKit.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ extension ARCamera {
*/
public enum TrackingState {
public enum Reason {
/** Tracking is limited due to initialization in progress. */
case initializing

/** Tracking is limited due to a excessive motion of the camera. */
case excessiveMotion

Expand Down Expand Up @@ -47,6 +50,7 @@ extension ARCamera {
let reason: TrackingState.Reason

switch __trackingStateReason {
case .initializing: reason = .initializing
case .excessiveMotion: reason = .excessiveMotion
default: reason = .insufficientFeatures
}
Expand Down
45 changes: 45 additions & 0 deletions stdlib/public/SDK/AVFoundation/AVCaptureDevice.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//

@_exported import AVFoundation // Clang module
import Foundation


#if os(iOS)

internal protocol _AVCaptureDeviceFormatSupportedColorSpaces {
@available(iOS, introduced: 10.0)
var __supportedColorSpaces: [NSNumber] { get }
}

extension _AVCaptureDeviceFormatSupportedColorSpaces {
@available(swift, obsoleted: 4.0)
@available(iOS, introduced: 10.0)
@nonobjc
public var supportedColorSpaces: [NSNumber]! {
return __supportedColorSpaces
}

@available(swift, introduced: 4.0)
@available(iOS, introduced: 10.0)
@nonobjc
public var supportedColorSpaces: [AVCaptureColorSpace] {
return __supportedColorSpaces.map { AVCaptureColorSpace(rawValue: $0.intValue)! }
}
}

@available(iOS, introduced: 10.0)
extension AVCaptureDevice.Format : _AVCaptureDeviceFormatSupportedColorSpaces {
}

#endif

98 changes: 98 additions & 0 deletions stdlib/public/SDK/AVFoundation/AVCapturePhotoOutput.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//

@_exported import AVFoundation // Clang module
import Foundation


#if os(iOS)

internal protocol _AVCapturePhotoOutputSwiftNativeTypes {
var __supportedFlashModes: [NSNumber] { get }
var __availablePhotoPixelFormatTypes: [NSNumber] { get }
var __availableRawPhotoPixelFormatTypes: [NSNumber] { get }
}

extension _AVCapturePhotoOutputSwiftNativeTypes {
@available(swift, obsoleted: 4.0)
@available(iOS, introduced: 10.0)
@nonobjc
public var supportedFlashModes: [NSNumber] {
return __supportedFlashModes
}

@available(swift, introduced: 4.0)
@available(iOS, introduced: 10.0)
@nonobjc
public var supportedFlashModes: [AVCaptureDevice.FlashMode] {
return __supportedFlashModes.map { AVCaptureDevice.FlashMode(rawValue: $0.intValue)! }
}

@available(swift, obsoleted: 4.0)
@available(iOS, introduced: 10.0)
@nonobjc
public var availablePhotoPixelFormatTypes: [NSNumber] {
return __availablePhotoPixelFormatTypes
}

@available(swift, introduced: 4.0)
@available(iOS, introduced: 10.0)
@nonobjc
public var availablePhotoPixelFormatTypes: [OSType] {
return __availablePhotoPixelFormatTypes.map { $0.uint32Value } as [OSType]
}

@available(swift, obsoleted: 4.0)
@available(iOS, introduced: 10.0)
@nonobjc
public var availableRawPhotoPixelFormatTypes: [NSNumber] {
return __availableRawPhotoPixelFormatTypes
}

@available(swift, introduced: 4.0)
@available(iOS, introduced: 10.0)
@nonobjc
public var availableRawPhotoPixelFormatTypes: [OSType] {
return __availableRawPhotoPixelFormatTypes.map { $0.uint32Value } as [OSType]
}
}

@available(iOS, introduced: 10.0)
extension AVCapturePhotoOutput : _AVCapturePhotoOutputSwiftNativeTypes {
}


internal protocol _AVCapturePhotoSettingsSwiftNativeTypes {
var __availablePreviewPhotoPixelFormatTypes: [NSNumber] { get }
}

extension _AVCapturePhotoSettingsSwiftNativeTypes {
@available(swift, obsoleted: 4.0)
@available(iOS, introduced: 10.0)
@nonobjc
public var availablePreviewPhotoPixelFormatTypes: [NSNumber] {
return __availablePreviewPhotoPixelFormatTypes
}

@available(swift, introduced: 4.0)
@available(iOS, introduced: 10.0)
@nonobjc
public var availablePreviewPhotoPixelFormatTypes: [OSType] {
return __availablePreviewPhotoPixelFormatTypes.map { $0.uint32Value } as [OSType]
}
}

@available(iOS, introduced: 10.0)
extension AVCapturePhotoSettings : _AVCapturePhotoSettingsSwiftNativeTypes {
}

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ extension AVCaptureSynchronizedDataCollection : Sequence {

public mutating func next() -> AVCaptureSynchronizedData? {
guard let nextAny = fastIterator.next() else { return nil }
return nextAny as! AVCaptureSynchronizedData
return (nextAny as! AVCaptureSynchronizedData)
}
}
}
Expand Down
37 changes: 37 additions & 0 deletions stdlib/public/SDK/AVFoundation/AVCaptureVideoDataOutput.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//

@_exported import AVFoundation // Clang module
import Foundation


#if os(macOS) || os(iOS)

extension AVCaptureVideoDataOutput {
@available(swift, obsoleted: 4.0)
@available(macOS, introduced: 10.7)
@available(iOS, introduced: 5.0)
@nonobjc
public var availableVideoCVPixelFormatTypes: [NSNumber]! {
return __availableVideoCVPixelFormatTypes
}

@available(swift, introduced: 4.0)
@available(macOS, introduced: 10.7)
@available(iOS, introduced: 5.0)
@nonobjc
public var availableVideoPixelFormatTypes: [OSType] {
return __availableVideoCVPixelFormatTypes.map { $0.uint32Value } as [OSType]
}
}

#endif
37 changes: 37 additions & 0 deletions stdlib/public/SDK/AVFoundation/AVMetadataObject.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//

@_exported import AVFoundation // Clang module
import Foundation
import CoreGraphics


#if os(iOS)

extension AVMetadataMachineReadableCodeObject {
@available(swift, obsoleted: 4.0)
@available(iOS, introduced: 7.0)
@nonobjc
public var corners: [Any]! {
return __corners
}

@available(swift, introduced: 4.0)
@available(iOS, introduced: 7.0)
@nonobjc
public var corners: [CGPoint] {
return __corners.map { CGPoint(dictionaryRepresentation: $0 as CFDictionary)! }
}
}

#endif

4 changes: 4 additions & 0 deletions stdlib/public/SDK/AVFoundation/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@ cmake_minimum_required(VERSION 3.4.3)
include("../../../../cmake/modules/StandaloneOverlay.cmake")

add_swift_library(swiftAVFoundation ${SWIFT_SDK_OVERLAY_LIBRARY_BUILD_TYPES} IS_SDK_OVERLAY
AVCaptureDevice.swift
AVCapturePhotoOutput.swift
AVCaptureSynchronizedDataCollection.swift
AVCaptureVideoDataOutput.swift
AVError.swift
AVMetadataObject.swift
NSValue.swift.gyb

TARGET_SDKS OSX IOS IOS_SIMULATOR TVOS TVOS_SIMULATOR
Expand Down
2 changes: 1 addition & 1 deletion stdlib/public/SDK/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ endif()

list(APPEND SWIFT_RUNTIME_SWIFT_COMPILE_FLAGS "${STDLIB_SIL_SERIALIZE_WITNESS_TABLES}")

set(all_overlays "Accelerate;AppKit;ARKit;AssetsLibrary;AVFoundation;CallKit;CloudKit;Contacts;CoreAudio;CoreData;CoreFoundation;CoreGraphics;CoreImage;CoreLocation;CoreMedia;CryptoTokenKit;Dispatch;Foundation;GameplayKit;GLKit;HomeKit;IOKit;Intents;MapKit;ModelIO;ObjectiveC;OpenCL;os;Photos;QuartzCore;SafariServices;SceneKit;simd;SpriteKit;UIKit;WatchKit;XCTest;XPC")
set(all_overlays "Accelerate;AppKit;ARKit;AssetsLibrary;AVFoundation;CallKit;CloudKit;Contacts;CoreAudio;CoreData;CoreFoundation;CoreGraphics;CoreImage;CoreLocation;CoreMedia;CryptoTokenKit;Dispatch;Foundation;GameplayKit;GLKit;HomeKit;IOKit;Intents;MapKit;MediaPlayer;ModelIO;ObjectiveC;OpenCL;os;Photos;QuartzCore;SafariServices;SceneKit;simd;SpriteKit;UIKit;WatchKit;XCTest;XPC")

if(DEFINED SWIFT_OVERLAY_TARGETS)
set(overlays_to_build ${SWIFT_OVERLAY_TARGETS})
Expand Down
1 change: 1 addition & 0 deletions stdlib/public/SDK/Intents/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ add_swift_library(swiftIntents ${SWIFT_SDK_OVERLAY_LIBRARY_BUILD_TYPES} IS_SDK_O
INGetCarLockStatusIntentResponse.swift
INGetCarPowerLevelStatusIntentResponse.swift
INIntegerResolutionResult.swift
INNotebookItemTypeResolutionResult.swift
INParameter.swift
INRequestRideIntent.swift
INRideOption.swift
Expand Down
26 changes: 26 additions & 0 deletions stdlib/public/SDK/Intents/INNotebookItemTypeResolutionResult.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//

@_exported import Intents
import Foundation

#if os(iOS) || os(watchOS)
@available(iOS 11.0, watchOS 4.0, *)
extension INNotebookItemTypeResolutionResult {
@nonobjc public
static func disambiguation(with valuesToDisambiguate: [INNotebookItemType]) -> Self {
let numbers = valuesToDisambiguate.map { NSNumber(value: $0.rawValue) }
return __disambiguationWithValues(toDisambiguate: numbers)
}
}
#endif

15 changes: 15 additions & 0 deletions stdlib/public/SDK/MediaPlayer/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
cmake_minimum_required(VERSION 3.4.3)
include("../../../../cmake/modules/StandaloneOverlay.cmake")

add_swift_library(swiftMediaPlayer ${SWIFT_SDK_OVERLAY_LIBRARY_BUILD_TYPES} IS_SDK_OVERLAY
MPMusicPlayerPlayParameters.swift

SWIFT_COMPILE_FLAGS "${SWIFT_RUNTIME_SWIFT_COMPILE_FLAGS}"
LINK_FLAGS "${SWIFT_RUNTIME_SWIFT_LINK_FLAGS}"
TARGET_SDKS IOS IOS_SIMULATOR

SWIFT_MODULE_DEPENDS_IOS Darwin AVFoundation CoreAudio CoreFoundation CoreGraphics CoreImage CoreMedia Dispatch Foundation ObjectiveC QuartzCore simd UIKit os CoreData # auto-updated
FRAMEWORK_DEPENDS_WEAK MediaPlayer

DEPLOYMENT_VERSION_IOS ${SWIFTLIB_DEPLOYMENT_VERSION_MEDIAPLAYER_IOS}
)
Loading