std: unconditionally use preadv/pwritev on AArch64 macOS#158179
Conversation
|
r? @Darksonn rustbot has assigned @Darksonn. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
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)? |
|
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. |
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 isaarch64-apple-darwin.