-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Convert instances of target_os = "macos"
to target_vendor = "apple"
#124788
Merged
Conversation
This file contains 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
This behavior is defined in general for the XNU kernel, not just macOS: https://github.com/apple-oss-distributions/xnu/blob/rel/xnu-10002/bsd/kern/uipc_socket.c
Tested in the iOS simulator that the thread name is not set by default, and that setting it improves the debugging experience in lldb / Xcode.
Tested on an old MacBook and the iOS simulator.
Tested in the iOS simulator with something like: ``` let mut buf = vec![0; c_int::MAX as usize - 1 + 2]; let read_bytes = f.read(&mut buf).unwrap(); ```
rustbot
added
O-unix
Operating system: Unix-like
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.
O-apple
Operating system: Apple (macOS, iOS, tvOS, visionOS, watchOS)
labels
May 6, 2024
taiki-e
reviewed
May 6, 2024
This uses `libc::fcntl`, which, while not explicitly marked as available in the headers, is already used by `File::sync_all` and `File::sync_data` on these platforms, so should be fine to use here as well.
madsmtm
force-pushed
the
reduce-target_os-macos
branch
from
May 6, 2024 07:14
2bd4dec
to
ff41c99
Compare
Thanks! @bors r+ |
bors
added
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
May 8, 2024
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
May 8, 2024
…kingjubilee Rollup of 4 pull requests Successful merges: - rust-lang#124470 (std::net: Socket::new_raw now set to SO_NOSIGPIPE on freebsd.) - rust-lang#124782 (add note about `AlreadyExists` to `create_new`) - rust-lang#124788 (Convert instances of `target_os = "macos"` to `target_vendor = "apple"`) - rust-lang#124838 (next_power_of_two: add a doctest to show what happens on 0) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
May 8, 2024
Rollup merge of rust-lang#124788 - madsmtm:reduce-target_os-macos, r=workingjubilee Convert instances of `target_os = "macos"` to `target_vendor = "apple"` rust-lang#124491 migrated towards using `target_vendor = "apple"` more, as there's very little difference between iOS, tvOS, watchOS and visionOS. In that PR, I only did the changes where the standard library already had fixes for iOS, that I could confidently apply to the other targets. However, there's actually also not that big of a gap between macOS and the aforementioned platforms - so in this PR, I've gone through a few of the instances of `target_os = "macos"` and replaced it with `target_vendor = "apple"` to improve support on those platforms, see the commits for details. r? workingjubilee CC `@thomcc` `@simlay` (do tell me if I should stop pinging you on these Apple PRs) `@rustbot` label O-apple
@bors force |
@bors r- |
bors
added
S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
and removed
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
labels
May 8, 2024
@bors retry r- |
bors
added
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed
S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
labels
May 8, 2024
bors
added
S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
and removed
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
labels
May 8, 2024
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
O-apple
Operating system: Apple (macOS, iOS, tvOS, visionOS, watchOS)
O-unix
Operating system: Unix-like
S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
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.
#124491 migrated towards using
target_vendor = "apple"
more, as there's very little difference between iOS, tvOS, watchOS and visionOS. In that PR, I only did the changes where the standard library already had fixes for iOS, that I could confidently apply to the other targets.However, there's actually also not that big of a gap between macOS and the aforementioned platforms - so in this PR, I've gone through a few of the instances of
target_os = "macos"
and replaced it withtarget_vendor = "apple"
to improve support on those platforms, see the commits for details.r? workingjubilee
CC @thomcc @simlay (do tell me if I should stop pinging you on these Apple PRs)
@rustbot label O-apple