mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
This change introduces a new compilation target platform to the Swift compiler - visionOS. - Changes to the compiler build infrastrucuture to support building compiler-adjacent artifacts and test suites for the new target. - Addition of the new platform kind definition. - Support for the new platform in language constructs such as compile-time availability annotations or runtime OS version queries. - Utilities to read out Darwin platform SDK info containing platform mapping data. - Utilities to support re-mapping availability annotations from iOS to visionOS (e.g. 'updateIntroducedPlatformForFallback', 'updateDeprecatedPlatformForFallback', 'updateObsoletedPlatformForFallback'). - Additional tests exercising platform-specific availability handling and availability re-mapping fallback code-path. - Changes to existing test suite to accomodate the new platform.
33 lines
1010 B
C++
33 lines
1010 B
C++
//===--- ldPlatformKinds.def - Compiler declaration metaprogramming --*- C++ -*-===//
|
|
//
|
|
// This source file is part of the Swift.org open source project
|
|
//
|
|
// Copyright (c) 2014 - 2020 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
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file defines platform IDs used to emit linker directives $ld$previous
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef LD_PLATFORM
|
|
# define LD_PLATFORM(Name, Id)
|
|
#endif
|
|
|
|
LD_PLATFORM(macOS, 1)
|
|
LD_PLATFORM(iOS, 2)
|
|
LD_PLATFORM(tvOS, 3)
|
|
LD_PLATFORM(watchOS, 4)
|
|
LD_PLATFORM(macCatalyst, 6)
|
|
LD_PLATFORM(iOS_sim, 7)
|
|
LD_PLATFORM(tvOS_sim, 8)
|
|
LD_PLATFORM(watchOS_sim, 9)
|
|
LD_PLATFORM(xrOS, 11)
|
|
LD_PLATFORM(xrOS_sim, 12)
|
|
|
|
#undef LD_PLATFORM
|