Skip to content

Commit

Permalink
fix: Add apple tvos support
Browse files Browse the repository at this point in the history
  • Loading branch information
lcruz99 committed Oct 3, 2023
1 parent 5b91c7b commit ad0a29d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 30 deletions.
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2620,6 +2620,8 @@ impl Build {
clang.to_string()
} else if target.contains("apple-watchos") {
clang.to_string()
} else if target.contains("apple-tvos") {
clang.to_string()
} else if target.contains("android") {
autodetect_android_compiler(&target, &host, gnu, clang)
} else if target.contains("cloudabi") {
Expand Down
30 changes: 0 additions & 30 deletions tests/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -507,33 +507,3 @@ fn gnu_apple_darwin() {
cmd.must_not_have("-isysroot");
}
}

#[cfg(target_os = "macos")]
#[test]
fn apple_tvos() {
for target in &["aarch64-apple-tvos"] {
let test = Test::gnu();
test.gcc()
.target(&target)
.host(&target)
.file("foo.c")
.compile("foo");

test.cmd(0).must_have("-mappletvos-version-min=9.0");
}
}

#[cfg(target_os = "macos")]
#[test]
fn apple_tvsimulator() {
for target in &["x86_64-apple-tvos"] {
let test = Test::gnu();
test.gcc()
.target(&target)
.host(&target)
.file("foo.c")
.compile("foo");

test.cmd(0).must_have("-mappletvsimulator-version-min=9.0");
}
}

0 comments on commit ad0a29d

Please sign in to comment.