-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Move sys::vxworks
code to sys::unix
#84119
Conversation
r? @m-ou-se (rust-highfive has picked a reviewer for you, use r? to override) |
Does this work for you? It gives some compiler errors:
|
Oh, it looks like quite a few of those errors also exist on the main branch. Apparently |
I tried, but that results in |
Ah, making |
It did :) passing |
☔ The latest upstream changes (presumably #78880) made this pull request unmergeable. Please resolve the merge conflicts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this!
@@ -223,7 +223,7 @@ impl Command { | |||
pub fn get_groups(&self) -> Option<&[gid_t]> { | |||
self.groups.as_deref() | |||
} | |||
|
|||
#[allow(dead_code)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's probably better to not put this attribute here and instead put something like let _ = self.get_closures();
with a comment in the vxworks code. Then it's more explicit that the pre_exec closures are ignored on vxworks.
(Ideally we shouldn't even expose pre_exec
on platforms that don't have that ability, but it's part of the unix
extension trait for Command
.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added your suggestion with a comment.
Thanks! @bors r+ (We should maybe try to at least run |
📌 Commit aa46f08 has been approved by |
🌲 The tree is currently closed for pull requests below priority 1000. This pull request will be tested once the tree is reopened. |
Move `sys::vxworks` code to `sys::unix` Follow-up to rust-lang#77666, `sys::vxworks` is almost identical to `sys::unix`, the only differences are the `rand`, `thread_local_dtor`, and `process` implementation. Since `vxworks` is `target_family = unix` anyway, there is no reason for the code not to live inside of `sys::unix` like all the other unix-OSes. https://github.com/rust-lang/rust/blob/e41f378f825488a537b024fc3ed599d9c12fda96/compiler/rustc_target/src/spec/vxworks_base.rs#L12 `@rustbot` label: +T-libs-impl
Rollup of 12 pull requests Successful merges: - rust-lang#84013 (Replace all `fmt.pad` with `debug_struct`) - rust-lang#84119 (Move `sys::vxworks` code to `sys::unix`) - rust-lang#84212 (Replace `Void` in `sys` with never type) - rust-lang#84251 (fix 'const-stable since' for NonZeroU*::new_unchecked) - rust-lang#84301 (Document that `index` and `index_mut` can panic) - rust-lang#84365 (Improve the docstrings of the `Lto` struct.) - rust-lang#84378 (Fix broken doc link) - rust-lang#84379 (Add GAT related tests) - rust-lang#84380 (Write Rustdoc titles like "x in crate::mod - Rust") - rust-lang#84390 (Format `Struct { .. }` on one line even with `{:#?}`.) - rust-lang#84393 (Support `x.py doc std --open`) - rust-lang#84406 (Remove `delete` alias from `mem::drop`.) Failed merges: - rust-lang#84387 (Move `sys_common::poison` to `sync::poison`) r? `@ghost` `@rustbot` modify labels: rollup
Follow-up to #77666,
sys::vxworks
is almost identical tosys::unix
, the only differences are therand
,thread_local_dtor
, andprocess
implementation. Sincevxworks
istarget_family = unix
anyway, there is no reason for the code not to live inside ofsys::unix
like all the other unix-OSes.rust/compiler/rustc_target/src/spec/vxworks_base.rs
Line 12 in e41f378
@rustbot label: +T-libs-impl