about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/src/coverage/graph.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-05-21 12:47:05 +0200
committerGitHub <noreply@github.com>2024-05-21 12:47:05 +0200
commita8ee8d508646816b535fc008f80c1d1ed9ccaa96 (patch)
treeba8e6badaa3d04e3465c980bc69713006ea0656d /compiler/rustc_mir_transform/src/coverage/graph.rs
parent7ef533bce604bfbf829953daea5dfef5fb85fa5d (diff)
parent38ad85160314b446a08705974d3b03cc29c338c9 (diff)
downloadrust-a8ee8d508646816b535fc008f80c1d1ed9ccaa96.tar.gz
rust-a8ee8d508646816b535fc008f80c1d1ed9ccaa96.zip
Rollup merge of #125225 - madsmtm:ios-crt_externs.h, r=workingjubilee
Use functions from `crt_externs.h` on iOS/tvOS/watchOS/visionOS

Use `_NSGetEnviron`, `_NSGetArgc` and `_NSGetArgv` on iOS/tvOS/watchOS/visionOS, see each commit and the code comments for details. This allows us to unify more code with the macOS implementation, as well as avoiding linking to the `Foundation` framework (which is good for startup performance).

The biggest problem with doing this would be if it lead to App Store rejections. After doing a bunch of research on this, while [it did happen once in 2009](https://blog.unity.com/engine-platform/unity-app-store-submissions-problem-solved), I find it fairly unlikely to happen nowadays, especially considering that Apple has later _added_ `crt_externs.h` to the iOS/tvOS/watchOS/visionOS SDKs, strongly signifying the functions therein is indeed supported on those platforms (even though they lack an availability attribute).

That we've been overly cautious here has also been noted by `@thomcc` in https://github.com/rust-lang/rust/pull/117910#issuecomment-1903372350.

r? `@workingjubilee`

`@rustbot` label O-apple
Diffstat (limited to 'compiler/rustc_mir_transform/src/coverage/graph.rs')
0 files changed, 0 insertions, 0 deletions