Skip to content

Support tvOS and watchOS (and simulator) targets #48862

Closed
@comex

Description

@comex

Apple's division of OS targets is a bit odd: apps for iPhones and iPads both use an iOS or "iPhoneOS" target, but watchOS and tvOS are treated as entirely separate targets or "platforms".

rustc currently supports macOS ({x86_64,i686}-apple-darwin), iOS ({armv7,armv7s,aarch64}-apple-ios), and the iOS Simulator (i386-apple-ios), but not tvOS or watchOS.

Here's the full list of platforms. (I'm not sure if the version-min argument is needed for rustc, but it would be needed in cc-rs, which is also missing support.)

Edit (9/10/19): Changes since this was originally posted:

OS Name Xcode Platform Name Valid Architectures LLVM Triple Clang -mxxx-version-min
macOS MacOSX i386 x86_64 x86_64-apple-macosx10.13.0 -mmacosx-version-min or -mmacos-version-min
iOS iPhoneOS arm64 armv7 armv7s arm64-apple-ios11.2.0 -miphoneos-version-min or -mios-version-min
iOS Simulator iPhoneOSSimulator i386 x86_64 x86_64-apple-ios11.2.0 -miphonesimulator-version-min or -mios-simulator-version-min
watchOS WatchOS armv7k thumbv7k-apple-watchos4.2.0 -mwatchos-version-min
watchOS Simulator WatchSimulator i386 x86_64 x86_64-apple-watchos4.2.0 -mwatchsimulator-version-min or -mwatchos-simulator-version-min
tvOS AppleTVOS arm64 arm64-apple-tvos11.2.0 -mappletvos-version-min or -mtvos-version-min
tvOS Simulator AppleTVSimulator x86_64 x86_64-apple-tvos11.2.0 -mappletvsimulator-version-min or -mtvos-simulator-version-min

Example output of xcodebuild -showsdks:

iOS SDKs:
	iOS 11.2                      	-sdk iphoneos11.2

iOS Simulator SDKs:
	Simulator - iOS 11.2          	-sdk iphonesimulator11.2

macOS SDKs:
	macOS 10.13                   	-sdk macosx10.13

tvOS SDKs:
	tvOS 11.2                     	-sdk appletvos11.2

tvOS Simulator SDKs:
	Simulator - tvOS 11.2         	-sdk appletvsimulator11.2

watchOS SDKs:
	watchOS 4.2                   	-sdk watchos4.2

watchOS Simulator SDKs:
	Simulator - watchOS 4.2       	-sdk watchsimulator4.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-target-specsArea: Compile-target specificationsC-feature-requestCategory: A feature request, i.e: not implemented / a PR.O-iosOperating system: iOSO-macosOperating system: macOSO-tvosOperating system: tvOS (including simulator)O-watchosOperating System: watchOST-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions