mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-20 10:55:14 +00:00
rustbuild: work around the stdarch cfg(bootstrap) bug.
This commit is contained in:
parent
0f1da639d4
commit
892ef6fa48
@ -102,8 +102,13 @@ fn main() {
|
||||
// FIXME: the fact that core here is excluded is due to core_arch from our stdarch submodule
|
||||
// being broken on the beta compiler with bootstrap passed, so this is a temporary workaround
|
||||
// (we've just snapped, so there are no cfg(bootstrap) related annotations in core).
|
||||
if stage == "0" && crate_name != Some("core") {
|
||||
cmd.arg("--cfg").arg("bootstrap");
|
||||
if stage == "0" {
|
||||
if crate_name != Some("core") {
|
||||
cmd.arg("--cfg").arg("bootstrap");
|
||||
} else {
|
||||
// NOTE(eddyb) see FIXME above, except now we need annotations again in core.
|
||||
cmd.arg("--cfg").arg("boostrap_stdarch_ignore_this");
|
||||
}
|
||||
}
|
||||
|
||||
// Print backtrace in case of ICE
|
||||
|
@ -1293,38 +1293,38 @@ extern "rust-intrinsic" {
|
||||
/// The stabilized versions of this intrinsic are available on the integer
|
||||
/// primitives via the `wrapping_add` method. For example,
|
||||
/// [`std::u32::wrapping_add`](../../std/primitive.u32.html#method.wrapping_add)
|
||||
#[cfg(bootstrap)]
|
||||
#[cfg(boostrap_stdarch_ignore_this)]
|
||||
pub fn overflowing_add<T>(a: T, b: T) -> T;
|
||||
/// Returns (a - b) mod 2<sup>N</sup>, where N is the width of T in bits.
|
||||
/// The stabilized versions of this intrinsic are available on the integer
|
||||
/// primitives via the `wrapping_sub` method. For example,
|
||||
/// [`std::u32::wrapping_sub`](../../std/primitive.u32.html#method.wrapping_sub)
|
||||
#[cfg(bootstrap)]
|
||||
#[cfg(boostrap_stdarch_ignore_this)]
|
||||
pub fn overflowing_sub<T>(a: T, b: T) -> T;
|
||||
/// Returns (a * b) mod 2<sup>N</sup>, where N is the width of T in bits.
|
||||
/// The stabilized versions of this intrinsic are available on the integer
|
||||
/// primitives via the `wrapping_mul` method. For example,
|
||||
/// [`std::u32::wrapping_mul`](../../std/primitive.u32.html#method.wrapping_mul)
|
||||
#[cfg(bootstrap)]
|
||||
#[cfg(boostrap_stdarch_ignore_this)]
|
||||
pub fn overflowing_mul<T>(a: T, b: T) -> T;
|
||||
|
||||
/// Returns (a + b) mod 2<sup>N</sup>, where N is the width of T in bits.
|
||||
/// The stabilized versions of this intrinsic are available on the integer
|
||||
/// primitives via the `wrapping_add` method. For example,
|
||||
/// [`std::u32::wrapping_add`](../../std/primitive.u32.html#method.wrapping_add)
|
||||
#[cfg(not(bootstrap))]
|
||||
#[cfg(not(boostrap_stdarch_ignore_this))]
|
||||
pub fn wrapping_add<T>(a: T, b: T) -> T;
|
||||
/// Returns (a - b) mod 2<sup>N</sup>, where N is the width of T in bits.
|
||||
/// The stabilized versions of this intrinsic are available on the integer
|
||||
/// primitives via the `wrapping_sub` method. For example,
|
||||
/// [`std::u32::wrapping_sub`](../../std/primitive.u32.html#method.wrapping_sub)
|
||||
#[cfg(not(bootstrap))]
|
||||
#[cfg(not(boostrap_stdarch_ignore_this))]
|
||||
pub fn wrapping_sub<T>(a: T, b: T) -> T;
|
||||
/// Returns (a * b) mod 2<sup>N</sup>, where N is the width of T in bits.
|
||||
/// The stabilized versions of this intrinsic are available on the integer
|
||||
/// primitives via the `wrapping_mul` method. For example,
|
||||
/// [`std::u32::wrapping_mul`](../../std/primitive.u32.html#method.wrapping_mul)
|
||||
#[cfg(not(bootstrap))]
|
||||
#[cfg(not(boostrap_stdarch_ignore_this))]
|
||||
pub fn wrapping_mul<T>(a: T, b: T) -> T;
|
||||
|
||||
/// Computes `a + b`, while saturating at numeric bounds.
|
||||
|
@ -1112,11 +1112,11 @@ $EndFeature, "
|
||||
without modifying the original"]
|
||||
#[inline]
|
||||
pub const fn wrapping_add(self, rhs: Self) -> Self {
|
||||
#[cfg(bootstrap)] {
|
||||
#[cfg(boostrap_stdarch_ignore_this)] {
|
||||
intrinsics::overflowing_add(self, rhs)
|
||||
}
|
||||
|
||||
#[cfg(not(bootstrap))] {
|
||||
#[cfg(not(boostrap_stdarch_ignore_this))] {
|
||||
intrinsics::wrapping_add(self, rhs)
|
||||
}
|
||||
}
|
||||
@ -1141,11 +1141,11 @@ $EndFeature, "
|
||||
without modifying the original"]
|
||||
#[inline]
|
||||
pub const fn wrapping_sub(self, rhs: Self) -> Self {
|
||||
#[cfg(bootstrap)] {
|
||||
#[cfg(boostrap_stdarch_ignore_this)] {
|
||||
intrinsics::overflowing_sub(self, rhs)
|
||||
}
|
||||
|
||||
#[cfg(not(bootstrap))] {
|
||||
#[cfg(not(boostrap_stdarch_ignore_this))] {
|
||||
intrinsics::wrapping_sub(self, rhs)
|
||||
}
|
||||
}
|
||||
@ -1169,11 +1169,11 @@ $EndFeature, "
|
||||
without modifying the original"]
|
||||
#[inline]
|
||||
pub const fn wrapping_mul(self, rhs: Self) -> Self {
|
||||
#[cfg(bootstrap)] {
|
||||
#[cfg(boostrap_stdarch_ignore_this)] {
|
||||
intrinsics::overflowing_mul(self, rhs)
|
||||
}
|
||||
|
||||
#[cfg(not(bootstrap))] {
|
||||
#[cfg(not(boostrap_stdarch_ignore_this))] {
|
||||
intrinsics::wrapping_mul(self, rhs)
|
||||
}
|
||||
}
|
||||
@ -3049,11 +3049,11 @@ $EndFeature, "
|
||||
without modifying the original"]
|
||||
#[inline]
|
||||
pub const fn wrapping_add(self, rhs: Self) -> Self {
|
||||
#[cfg(bootstrap)] {
|
||||
#[cfg(boostrap_stdarch_ignore_this)] {
|
||||
intrinsics::overflowing_add(self, rhs)
|
||||
}
|
||||
|
||||
#[cfg(not(bootstrap))] {
|
||||
#[cfg(not(boostrap_stdarch_ignore_this))] {
|
||||
intrinsics::wrapping_add(self, rhs)
|
||||
}
|
||||
}
|
||||
@ -3077,11 +3077,11 @@ $EndFeature, "
|
||||
without modifying the original"]
|
||||
#[inline]
|
||||
pub const fn wrapping_sub(self, rhs: Self) -> Self {
|
||||
#[cfg(bootstrap)] {
|
||||
#[cfg(boostrap_stdarch_ignore_this)] {
|
||||
intrinsics::overflowing_sub(self, rhs)
|
||||
}
|
||||
|
||||
#[cfg(not(bootstrap))] {
|
||||
#[cfg(not(boostrap_stdarch_ignore_this))] {
|
||||
intrinsics::wrapping_sub(self, rhs)
|
||||
}
|
||||
}
|
||||
@ -3106,11 +3106,11 @@ $EndFeature, "
|
||||
without modifying the original"]
|
||||
#[inline]
|
||||
pub const fn wrapping_mul(self, rhs: Self) -> Self {
|
||||
#[cfg(bootstrap)] {
|
||||
#[cfg(boostrap_stdarch_ignore_this)] {
|
||||
intrinsics::overflowing_mul(self, rhs)
|
||||
}
|
||||
|
||||
#[cfg(not(bootstrap))] {
|
||||
#[cfg(not(boostrap_stdarch_ignore_this))] {
|
||||
intrinsics::wrapping_mul(self, rhs)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user