Skip to content

std: unconditionally use preadv/pwritev on AArch64 macOS#158179

Open
joboet wants to merge 1 commit into
rust-lang:mainfrom
joboet:arm_macos_preadv
Open

std: unconditionally use preadv/pwritev on AArch64 macOS#158179
joboet wants to merge 1 commit into
rust-lang:mainfrom
joboet:arm_macos_preadv

Conversation

@joboet

@joboet joboet commented Jun 20, 2026

Copy link
Copy Markdown
Member

The stars happened to line up perfectly: macOS 11.0 was the first version to support ARM, and also the first version with preadv/pwritev. Thus we don't need to use weak linkage if the target is aarch64-apple-darwin.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jun 20, 2026
@rustbot

rustbot commented Jun 20, 2026

Copy link
Copy Markdown
Collaborator

r? @Darksonn

rustbot has assigned @Darksonn.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @ChrisDenton, libs
  • @ChrisDenton, libs expanded to 12 candidates
  • Random selection from Darksonn, Mark-Simulacrum, clarfonthey, jhpratt

@Mark-Simulacrum

Copy link
Copy Markdown
Member

How did you check which versions of macOS support preadv/pwritev? Maybe we can document that into https://doc.rust-lang.org/nightly/rustc/platform-support/apple-darwin.html or some other location (seems like more generally useful information).

Also -- do we know if the non-macOS platforms support these (watchos/tvos/etc)?

@joboet

joboet commented Jun 21, 2026

Copy link
Copy Markdown
Member Author

The minimum versions are given in the header file containing the function. Interestingly, that file reports a different version (10.16) than my local SDK header files, which says that its supported since 11.0.

As for the other Apple OSes, they have these functions too, but our minimum version is too old.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants