about summary refs log tree commit diff
path: root/tests/ui/codegen/overflow-during-mono.rs
diff options
context:
space:
mode:
authorTrevor Gross <t.gross35@gmail.com>2025-08-08 14:22:42 -0500
committerGitHub <noreply@github.com>2025-08-08 14:22:42 -0500
commit6674fe282bc48ef94e56b44bab582b7630987d29 (patch)
treeda703904dd9303338262092b848e2d122b0e4d42 /tests/ui/codegen/overflow-during-mono.rs
parent2886b36df4a646dd8d82fb65bf0c9d8d96c1f71a (diff)
parentd434cae18f92d8a5ef8996fb579e2c11efbaa2cb (diff)
downloadrust-6674fe282bc48ef94e56b44bab582b7630987d29.tar.gz
rust-6674fe282bc48ef94e56b44bab582b7630987d29.zip
Rollup merge of #139451 - madsmtm:apple-target-env-abi, r=wesleywiser
Add `target_env = "macabi"` and `target_env = "sim"`

[RFC 2992](https://github.com/rust-lang/rfcs/pull/2992) ([tracking issue](https://github.com/rust-lang/rust/issues/80970)) introduced `cfg(target_abi = ...)` with the original motivation being Mac Catalyst and Apple Simulator targets. These do not actually have a changed calling convention in the same sense that e.g. `cfg(target_abi = "eabihf")` or pointer authentication (`arm64e`) does, see https://github.com/rust-lang/rust/issues/133331.

Specifically, for Apple Simulator targets, the binary runs under the following conditions:
- Runs with the host macOS kernel (but in a mode configured for iOS/tvOS/...).
- Uses frameworks for the specific simulator version being targetted.
- System file accesses need to be made relative to the `IPHONE_SIMULATOR_ROOT` environment variable.
- Uses host GPUs directly.

And for Mac Catalyst:
- Runs with the host macOS kernel (but in a mode configured for iOS).
- Uses mostly host macOS frameworks (though with a few things changed, e.g. the [`NSImageResizingModeStretch`](https://developer.apple.com/documentation/appkit/nsimage/resizingmode-swift.enum/stretch?language=objc) enum has a different value).
- Uses host GPUs, camera and other peripherals directly.

As can be seen, these seem better suited as `target_env`s, since it really is the environment that the binary is running under that's changed (regardless of the Mac Catalyst "macabi" having "abi" in the name). So this PR adds `target_env = "sim"` and `target_env = "macabi"`, with the idea of possibly deprecating `target_abi = "sim"` and `target_abi = "macabi"` in the far future.

This affects iOS Tier 2 targets (`aarch64-apple-ios-sim`, `x86_64-apple-ios`, `aarch64-apple-ios-macabi` and `x86_64-apple-ios-macabi`), and probably needs a compiler FCP.

Fixes https://github.com/rust-lang/rust/issues/133331.
Reference PR: https://github.com/rust-lang/reference/pull/1781.
Cargo doc PR: https://github.com/rust-lang/cargo/pull/15404.

r? compiler
CC `@workingjubilee`
CC target maintainers `@deg4uss3r` `@thomcc` `@badboy` `@BlackHoleFox` `@madsmtm` `@agg23`
Diffstat (limited to 'tests/ui/codegen/overflow-during-mono.rs')
0 files changed, 0 insertions, 0 deletions