mirror of
https://github.com/apple/swift.git
synced 2026-10-26 20:15:53 +01:00
This PR fixes a few xrsimulator-arm64 lit failures:
* `test/lit.cfg`: The `FUTURE_VERSION` dict was missing `'xros'`, so
`%target-future-triple` collapsed to a versionless
`arm64-apple-xros-simulator` (pinned to the visionOS 1.0 deployment
floor) instead of the intended `...99.99...`.
* `utils/availability-macros.def`: the `SwiftStdlib 9999` entries had no
visionOS row, so the compiler derived visionOS availability from iOS
(`iOS 13.0 → visionOS 13.0`, etc.), producing unreachable version
requirements at the visionOS 1.0 deployment target.
* `Frontend/ast-dump-json-no-crash.swift` — the hand-authored
`@available(iOS, introduced: 14.0)` was flagged unavailable on visionOS
via iOS-derivation. Add an explicit visionOS 1.0 introduction.
* `IRGen/coroutine_accessors_backdeploy_async_56.swift` — visionOS
enters `RuntimeVersions.def` at 5.10/1.0, so Swift 5.7 is
always-available and the pre-5.7 back-deploy layout is never emitted.
`UNSUPPORTED: OS=xros`.
* `ModuleInterface/assoc_type_inference_tvos.swift` — the clang-importer
SDK does not contain SDKSettings.json, which is required for
availability derivation for visionOS. Marking as unsupported until that
is fixed.
*
`Concurrency/Runtime/{nonisolated_inherits_isolation,unspecified_is_main_actor}.swift`
— both `@_silgen_name("dispatch_assert_queue")` against a bare C symbol
that is hidden on visionOS 1.0 (only `$V2` is exported). `UNSUPPORTED:
OS=xros`.
* `TBD/multimodule-implied-objc.swift` — drop stale `XFAIL: OS=xros`
from the original "Introduce VisionOS Platform" bootstrap; the test now
passes.
58 lines
1.8 KiB
Swift
58 lines
1.8 KiB
Swift
// REQUIRES: VENDOR=apple
|
|
// RUN: %empty-directory(%t)
|
|
// RUN: %empty-directory(%t/cache)
|
|
// RUN: split-file %s %t
|
|
|
|
/// Create Swift modules to import.
|
|
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) \
|
|
// RUN: -module-name IndirectMixedDependency -I %t \
|
|
// RUN: -enable-library-evolution \
|
|
// RUN: -target %target-swift-5.8-abi-triple \
|
|
// RUN: -emit-module %t/IndirectMixedDependency.swift \
|
|
// RUN: -emit-module-path %t/IndirectMixedDependency.swiftmodule
|
|
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) \
|
|
// RUN: -enable-library-evolution \
|
|
// RUN: -target %target-swift-5.8-abi-triple \
|
|
// RUN: -emit-module %t/SwiftDependency.swift \
|
|
// RUN: -module-name SwiftDependency -I %t\
|
|
// RUN: -emit-module-path %t/SwiftDependency.swiftmodule
|
|
|
|
// Generate TBD file.
|
|
// RUN: %target-swift-frontend -I %t -module-cache-path %t/cache \
|
|
// RUN: %t/Client.swift -emit-ir -o/dev/null -parse-as-library \
|
|
// RUN: -target %target-swift-5.8-abi-triple \
|
|
// RUN: -module-name client -validate-tbd-against-ir=missing \
|
|
// RUN: -tbd-install_name client -emit-tbd -emit-tbd-path %t/client.tbd
|
|
|
|
// RUN: %validate-json %t/client.tbd | %FileCheck %s
|
|
|
|
// CHECK-NOT: "CLASS_$__TtCO6client11extendedAPI6Square"
|
|
// CHECK: "objc_class"
|
|
// CHECK: "_TtCO6client11extendedAPI6Square"
|
|
|
|
//--- module.modulemap
|
|
module IndirectMixedDependency {
|
|
header "IndirectMixedDependency.h"
|
|
}
|
|
|
|
//--- IndirectMixedDependency.h
|
|
@import Foundation;
|
|
@interface Shape : NSObject
|
|
@end
|
|
|
|
//--- IndirectMixedDependency.swift
|
|
@_exported import IndirectMixedDependency
|
|
|
|
//--- SwiftDependency.swift
|
|
import IndirectMixedDependency
|
|
open class Rectangle : IndirectMixedDependency.Shape {}
|
|
|
|
|
|
//--- Client.swift
|
|
import SwiftDependency
|
|
|
|
public enum extendedAPI {}
|
|
extension extendedAPI {
|
|
public class Square : SwiftDependency.Rectangle {}
|
|
}
|