Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aarch64-apple-ios-sim target doesn't set cfg(target_env = "sim") #116206

Closed
jrose-signal opened this issue Sep 27, 2023 · 3 comments
Closed

aarch64-apple-ios-sim target doesn't set cfg(target_env = "sim") #116206

jrose-signal opened this issue Sep 27, 2023 · 3 comments
Labels
C-bug Category: This is a bug.

Comments

@jrose-signal
Copy link

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).

@jrose-signal jrose-signal added the C-bug Category: This is a bug. label Sep 27, 2023
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Sep 27, 2023
@jrose-signal
Copy link
Author

@jrose-signal

This comment was marked as outdated.

@jrose-signal
Copy link
Author

jrose-signal commented Sep 27, 2023

Never mind, off to comment on #80970

@jrose-signal jrose-signal closed this as not planned Won't fix, can't repro, duplicate, stale Sep 27, 2023
@fmease fmease removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Sep 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug.
Projects
None yet
Development

No branches or pull requests

3 participants