SubArch
Triple.swift:847enum SubArch
enum SubArch
import Basics
@dynamicMemberLookup struct Triple
Helper for working with target triples.
case arm(ARM)
case kalimba(Kalimba)
case mips(MIPS)
init(_ description: String) throws
init(_ string: String, normalizing: Bool = false)
init(from decoder: Decoder) throws
static let macOS: Triple
static func getHostTriple(usingSwiftCompiler swiftCompiler: AbsolutePath) throws -> Triple
Determine the versioned host triple using the Swift compiler.
var _iOSVersion: Version { get }
Parse the version number as with getOSVersion. This should only be called with IOS or generic triples.
var _isSimulatorEnvironment: Bool { get }
If this is a Darwin device platform, should it be inferred to be a device simulator?
var _macOSVersion: Version? { get }
Parse the version number as with getOSVersion and then translate generic “darwin” versions to the corresponding OS X versions. This may also be called with IOS triples but the OS X version number is just set to a constant 10.4.0 in that case.
var _watchOSVersion: Version { get }
Parse the version number as with getOSVersion. This should only be called with WatchOS or generic triples.
let arch: Arch?
The parsed arch.
var archName: String { get }
var darwinLinkerPlatformVersion: Version { get }
var darwinPlatform: DarwinPlatform? { get }
Returns the DarwinPlatform
for this triple, or nil
if it is a non-Darwin platform.
var description: String { get }
var dynamicLibraryExtension: String { get }
The file extension for dynamic libraries (eg. .dll
, .so
, or .dylib
)
var dynamicLibraryPrefix: String { get }
The file prefix for dynamic libraries
let environment: Environment?
The parsed Environment type.
var environmentName: String { get }
var executableExtension: String { get }
var isMacCatalyst: Bool { get }
var isWasm: Bool { get }
var nsbundleExtension: String { get }
The file extension for Foundation-style bundle.
let objectFormat: ObjectFormat?
The object format type.
let os: OS?
The parsed OS.
var osName: String { get }
Returns the name of the OS from the triple string.
var osNameUnversioned: String { get }
var osVersion: Version { get }
Parse the version number from the OS name component of the triple, if present.
var staticLibraryExtension: String { get }
The file extension for static libraries.
let subArch: SubArch?
The parsed subarchitecture.
let triple: String
The original triple string.
var tripleString: String { get }
let vendor: Vendor?
The parsed vendor.
var vendorName: String { get }
subscript(dynamicMember predicate: KeyPath<OS, Bool>) -> Bool { get }
Triple
proxies predicates from Triple.OS
, returning false
for an unknown OS.
static func == (lhs: Triple, rhs: Triple) -> Bool
func encode(to encoder: Encoder) throws
func isAndroid() -> Bool
func isApple() -> Bool
func isDarwin() -> Bool
func isLinux() -> Bool
func isOpenBSD() -> Bool
func isRuntimeCompatible(with triple: Triple) -> Bool
Returns true
if code compiled for triple
can run on self
value of Triple
.
func isWASI() -> Bool
func isWindows() -> Bool
func platformName(conflatingDarwin: Bool = false) -> String?
The platform name, i.e. the name clang uses to identify this target in its resource directory.
func supports(_ feature: FeatureAvailability) -> Bool
Checks whether the triple supports the specified feature, i.e., the feature has been introduced by the OS and version indicated by the triple.
func tripleString(forPlatformVersion version: String) -> String
Returns the triple string for the given platform version.
func version(for compatibilityPlatform: DarwinPlatform? = nil) -> Triple.Version
Returns the OS version equivalent for the given platform, converting and defaulting various representations.
enum Arch
enum Environment
struct FeatureAvailability
Represents the availability of a feature that is supported on some platforms and versions, but not all. For Darwin versions, the version numbers provided should be the version where the feature was added or the change was introduced, because all version checks are in the form of tripleVersion >= featureVersion
.
enum OS
enum ObjectFormat
enum Vendor
struct Version
Represents a version that may be present in the target triple.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable : Equatable
A type that can be hashed into a Hasher
to produce an integer hash value.
enum ARM
enum Kalimba
enum MIPS
static func != (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether two values are not equal.