Skip to content

Commit

Permalink
Auto merge of rust-lang#103455 - BlackHoleFox:apple-sim-abi-consisten…
Browse files Browse the repository at this point in the history
…cy, r=davidtwco

Fixed consistency of Apple simulator target's ABI

Currently there's a few Apple device simulator targets that are inconsistent since some set `target_abi = "sim"` (the correct thing to do) while a bunch of others don't set anything (`""`). Due to this its very hard to reliability check if some Rust code is running inside a simulator. This changes all of them to do the same thing and set `sim` as their `target_abi`.

The new way to identity a simulator during compilation is as simple as `cfg(all(target_vendor="apple", target_abi = "sim"))` or even `cfg(target_abi = "sim")` being less pedantic about it.

The issues with the current form (and inspiration for this) are also summarized in `@thomcc's` [Tweet](https://twitter.com/at_tcsc/status/1576685244702691328).
  • Loading branch information
bors committed Nov 3, 2022
2 parents 84e903f + 1bccc94 commit 4583071
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit 4583071

Please sign in to comment.