File tree Expand file tree Collapse file tree 4 files changed +40
-4
lines changed Expand file tree Collapse file tree 4 files changed +40
-4
lines changed Original file line number Diff line number Diff line change 92
92
- run : cargo test ${{ matrix.no_run }} --manifest-path cc-test/Cargo.toml --target ${{ matrix.target }} --features parallel
93
93
- run : cargo test ${{ matrix.no_run }} --manifest-path cc-test/Cargo.toml --target ${{ matrix.target }} --release
94
94
95
+ check-tvos :
96
+ name : Test aarch64-apple-tvos
97
+ runs-on : macos-latest
98
+ steps :
99
+ - uses : actions/checkout@v4
100
+ - name : Install Rust (rustup)
101
+ run : |
102
+ set -euxo pipefail
103
+ rustup toolchain install nightly --no-self-update --profile minimal
104
+ rustup component add rust-src --toolchain nightly
105
+ rustup default nightly
106
+ shell : bash
107
+ - run : cargo test -Z build-std=std --no-run --target aarch64-apple-tvos
108
+ - run : cargo test -Z build-std=std --no-run --features parallel --target aarch64-apple-tvos
109
+ - run : cargo test -Z build-std=std --no-run --manifest-path cc-test/Cargo.toml --target aarch64-apple-tvos
110
+ - run : cargo test -Z build-std=std --no-run --manifest-path cc-test/Cargo.toml --target aarch64-apple-tvos --features parallel
111
+ - run : cargo test -Z build-std=std --no-run --manifest-path cc-test/Cargo.toml --target aarch64-apple-tvos --release
112
+
95
113
cuda :
96
114
name : Test CUDA support
97
115
runs-on : ubuntu-20.04
Original file line number Diff line number Diff line change @@ -1831,6 +1831,16 @@ impl Build {
1831
1831
. into ( ) ,
1832
1832
) ;
1833
1833
}
1834
+ } else if target. contains ( "aarch64-apple-tvos" ) {
1835
+ if let Some ( arch) =
1836
+ map_darwin_target_from_rust_to_compiler_architecture ( target)
1837
+ {
1838
+ let deployment_target =
1839
+ self . apple_deployment_version ( AppleOs :: TvOs , target, None ) ;
1840
+ cmd. args . push (
1841
+ format ! ( "--target={}-apple-tvos{}" , arch, deployment_target) . into ( ) ,
1842
+ ) ;
1843
+ }
1834
1844
} else if target. starts_with ( "riscv64gc-" ) {
1835
1845
cmd. args . push (
1836
1846
format ! ( "--target={}" , target. replace( "riscv64gc" , "riscv64" ) ) . into ( ) ,
@@ -2568,6 +2578,8 @@ impl Build {
2568
2578
clang. to_string ( )
2569
2579
} else if target. contains ( "apple-watchos" ) {
2570
2580
clang. to_string ( )
2581
+ } else if target. contains ( "apple-tvos" ) {
2582
+ clang. to_string ( )
2571
2583
} else if target. contains ( "android" ) {
2572
2584
autodetect_android_compiler ( & target, & host, gnu, clang)
2573
2585
} else if target. contains ( "cloudabi" ) {
Original file line number Diff line number Diff line change @@ -61,6 +61,12 @@ impl Test {
61
61
t
62
62
}
63
63
64
+ pub fn clang ( ) -> Test {
65
+ let t = Test :: new ( ) ;
66
+ t. shim ( "clang" ) . shim ( "clang++" ) . shim ( "ar" ) ;
67
+ t
68
+ }
69
+
64
70
pub fn shim ( & self , name : & str ) -> & Test {
65
71
let name = if name. ends_with ( env:: consts:: EXE_SUFFIX ) {
66
72
name. to_string ( )
Original file line number Diff line number Diff line change @@ -510,9 +510,9 @@ fn gnu_apple_darwin() {
510
510
511
511
#[ cfg( target_os = "macos" ) ]
512
512
#[ test]
513
- fn apple_tvos ( ) {
513
+ fn clang_apple_tvos ( ) {
514
514
for target in & [ "aarch64-apple-tvos" ] {
515
- let test = Test :: gnu ( ) ;
515
+ let test = Test :: clang ( ) ;
516
516
test. gcc ( )
517
517
. target ( & target)
518
518
. host ( & target)
@@ -525,9 +525,9 @@ fn apple_tvos() {
525
525
526
526
#[ cfg( target_os = "macos" ) ]
527
527
#[ test]
528
- fn apple_tvsimulator ( ) {
528
+ fn clang_apple_tvsimulator ( ) {
529
529
for target in & [ "x86_64-apple-tvos" ] {
530
- let test = Test :: gnu ( ) ;
530
+ let test = Test :: clang ( ) ;
531
531
test. gcc ( )
532
532
. target ( & target)
533
533
. host ( & target)
You can’t perform that action at this time.
0 commit comments