File tree Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ readme = "README.md"
11
11
documentation = " https://docs.rs/gfx-backend-metal"
12
12
workspace = " ../../.."
13
13
edition = " 2018"
14
+ build = " build/build.rs"
14
15
15
16
[features ]
16
17
# TODO: add a feature to enable `profiling`, so that we can CI test it
Original file line number Diff line number Diff line change
1
+ fn main ( ) {
2
+ println ! (
3
+ "cargo:rustc-env=TARGET={}" ,
4
+ std:: env:: var( "TARGET" ) . unwrap( )
5
+ ) ;
6
+ }
Original file line number Diff line number Diff line change @@ -456,7 +456,11 @@ impl ServicePipes {
456
456
let data = if cfg ! ( target_os = "macos" ) {
457
457
& include_bytes ! ( "./../shaders/gfx-shaders-macos.metallib" ) [ ..]
458
458
} else if cfg ! ( target_arch = "aarch64" ) {
459
- & include_bytes ! ( "./../shaders/gfx-shaders-ios.metallib" ) [ ..]
459
+ if env ! ( "TARGET" ) == "aarch64-apple-ios-sim" {
460
+ & include_bytes ! ( "./../shaders/gfx-shaders-ios-simulator.metallib" ) [ ..]
461
+ } else {
462
+ & include_bytes ! ( "./../shaders/gfx-shaders-ios.metallib" ) [ ..]
463
+ }
460
464
} else {
461
465
& include_bytes ! ( "./../shaders/gfx-shaders-ios-simulator.metallib" ) [ ..]
462
466
} ;
You can’t perform that action at this time.
0 commit comments