-
Notifications
You must be signed in to change notification settings - Fork 540
Add target_env = "macabi"
and target_env = "sim"
#1781
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
Open
madsmtm
wants to merge
1
commit into
rust-lang:master
Choose a base branch
from
madsmtm:apple-target-env-abi
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Replaces `target_abi` variants. The old variants are still available, but may be deprecated in the future.
The |
tgross35
added a commit
to tgross35/rust
that referenced
this pull request
Aug 8, 2025
…sleywiser Add `target_env = "macabi"` and `target_env = "sim"` [RFC 2992](rust-lang/rfcs#2992) ([tracking issue](rust-lang#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 rust-lang#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 rust-lang#133331. Reference PR: rust-lang/reference#1781. Cargo doc PR: rust-lang/cargo#15404. r? compiler CC `@workingjubilee` CC target maintainers `@deg4uss3r` `@thomcc` `@badboy` `@BlackHoleFox` `@madsmtm` `@agg23`
rust-timer
added a commit
to rust-lang/rust
that referenced
this pull request
Aug 9, 2025
Rollup merge of #139451 - madsmtm:apple-target-env-abi, r=wesleywiser Add `target_env = "macabi"` and `target_env = "sim"` [RFC 2992](rust-lang/rfcs#2992) ([tracking issue](#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 #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 #133331. Reference PR: rust-lang/reference#1781. Cargo doc PR: rust-lang/cargo#15404. r? compiler CC `@workingjubilee` CC target maintainers `@deg4uss3r` `@thomcc` `@badboy` `@BlackHoleFox` `@madsmtm` `@agg23`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Replaces
target_abi
variants. The old variants are still available, but may be deprecated in the future, so I've removed them as examples from the reference.Depends on rust-lang/rust#139451.