Rollup merge of #146800 - thaliaarchi:fix-move-pal-thread, r=joboet
Fix unsupported `std::sys::thread` after move
Fixes building std for any platform with an unsupported thread abstraction. This includes {aarch64,armv7,x86_64}-unknown-trusty and riscv32im-risc0-zkvm-elf, which explicitly include the unsupported module, and platforms with no PAL.
Bug fix for rust-lang/rust#145177 (std: move thread into sys).
Also fix the `std` build for xtensa, which I incidentally found while looking for an unsupported platform.
r? ``@joboet``
This commit is contained in:
commit
48c1249bff
6 changed files with 3 additions and 8 deletions
|
|
@ -2,6 +2,7 @@
|
|||
//!
|
||||
//! Better known as "varargs".
|
||||
|
||||
#[cfg(not(target_arch = "xtensa"))]
|
||||
use crate::ffi::c_void;
|
||||
#[allow(unused_imports)]
|
||||
use crate::fmt;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
// Replaces the #[else] gate with #[cfg(not(any(…)))] of all the other gates.
|
||||
// This ensures that they must be mutually exclusive and do not have precedence
|
||||
// like cfg_if!.
|
||||
// like cfg_select!.
|
||||
macro cfg_unordered(
|
||||
$(#[cfg($cfg:meta)] $os:item)*
|
||||
#[else] $fallback:item
|
||||
|
|
|
|||
|
|
@ -7,8 +7,6 @@ mod common;
|
|||
pub mod os;
|
||||
#[path = "../unsupported/pipe.rs"]
|
||||
pub mod pipe;
|
||||
#[path = "../unsupported/thread.rs"]
|
||||
pub mod thread;
|
||||
#[path = "../unsupported/time.rs"]
|
||||
pub mod time;
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
pub mod os;
|
||||
pub mod pipe;
|
||||
pub mod thread;
|
||||
pub mod time;
|
||||
|
||||
mod common;
|
||||
|
|
|
|||
|
|
@ -14,8 +14,6 @@ pub mod abi;
|
|||
pub mod os;
|
||||
#[path = "../unsupported/pipe.rs"]
|
||||
pub mod pipe;
|
||||
#[path = "../unsupported/thread.rs"]
|
||||
pub mod thread;
|
||||
#[path = "../unsupported/time.rs"]
|
||||
pub mod time;
|
||||
|
||||
|
|
|
|||
|
|
@ -4,8 +4,7 @@ use libc::{self, RTP_ID, c_char, c_int};
|
|||
use super::common::*;
|
||||
use crate::io::{self, ErrorKind};
|
||||
use crate::num::NonZero;
|
||||
use crate::sys::cvt;
|
||||
use crate::sys::pal::thread;
|
||||
use crate::sys::{cvt, thread};
|
||||
use crate::{fmt, sys};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue