Skip to content
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
5 changes: 5 additions & 0 deletions compiler/rustc_target/src/spec/base/apple/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,11 @@ fn watchos_deployment_target() -> (u32, u32) {
from_set_deployment_target("WATCHOS_DEPLOYMENT_TARGET").unwrap_or((5, 0))
}

pub fn watchos_llvm_target(arch: Arch) -> String {
let (major, minor) = watchos_deployment_target();
format!("{}-apple-watchos{}.{}.0", arch.target_name(), major, minor)
}

pub fn watchos_sim_llvm_target(arch: Arch) -> String {
let (major, minor) = watchos_deployment_target();
format!("{}-apple-watchos{}.{}.0-simulator", arch.target_name(), major, minor)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
use crate::spec::base::apple::{opts, Arch};
use crate::spec::base::apple::{opts, watchos_llvm_target, Arch};
use crate::spec::{Target, TargetOptions};

pub fn target() -> Target {
let base = opts("watchos", Arch::Arm64_32);
let arch = Arch::Arm64_32;
let base = opts("watchos", arch);
Target {
llvm_target: "arm64_32-apple-watchos".into(),
llvm_target: watchos_llvm_target(arch).into(),
metadata: crate::spec::TargetMetadata {
description: None,
tier: None,
Expand Down