-
Notifications
You must be signed in to change notification settings - Fork 14k
Description
I tried to identify iOS devices (not simulators) with the following cfg attribute:
#[cfg(all(target_os = "ios", target_arch = "aarch64", not(target_env = "sim")))This is to distinguish the aarch64-apple-ios and aarch64-apple-ios-sim targets (the latter promoted to Tier 2 in #87760). Unfortunately, target_env = "sim" isn't set for aarch64-apple-ios-sim, making them identical as far as the built-in cfg options go.
This isn't the end of the world because I can test the full target in build.rs, but it is a little frustrating.
Bonus: it would be nice™ to set target_env = "sim" for x86_64-apple-ios as well, which is also a simulator target. It historically didn't have -sim in its canonical form because Apple never made Intel iPhones, but it would be great to drop the target_arch condition altogether (especially if #115526 ends up changing the target_arch).