mirror of
https://codeberg.org/kiss-community/repo
synced 2025-03-03 11:00:01 -07:00
parent
7c7837853d
commit
325da5607e
@ -2,6 +2,18 @@
|
||||
|
||||
patch -p1 < no-x11.patch
|
||||
|
||||
# Firefox 90 cannot be built with rust 1.54.0. This updates a crate
|
||||
# used by Firefox to work around this issue.
|
||||
{
|
||||
sed '/const_fn,/d' third_party/rust/packed_simd/src/lib.rs > _
|
||||
mv -f _ third_party/rust/packed_simd/src/lib.rs
|
||||
|
||||
printf '{"package":null,"files":{}}\n' \
|
||||
> third_party/rust/packed_simd/.cargo-checksum.json
|
||||
|
||||
patch -p1 < rust-1.45.0.patch
|
||||
}
|
||||
|
||||
# Remove fribidi dependency.
|
||||
sed '/fribidi/d' config/system-headers.mozbuild > _
|
||||
mv -f _ config/system-headers.mozbuild
|
||||
|
@ -3,3 +3,4 @@ f0611136bee505811e9ca11ca7ac188ef5323a8e2ef19cffd3edb3cf08fd791e
|
||||
3dce6601b495f5b3d45b59f7d2492a340ee7e84b5beca17e48f862502bd5603f
|
||||
f0e8bb1f9b7eb0b01285495a2699df3a4b766784c1765a8f1aeedf63c0806369
|
||||
a88ecf15a164dd82f9deb6576ff744d4ed1fda7ebd273e63b01e0c1d93c9ed1d
|
||||
8346ee5ef1aa1aea53d76d50044af84f7a26468fd1fa7e9f7a0d5819ed4d81bb
|
||||
|
269
extra/firefox/patches/rust-1.45.0.patch
Normal file
269
extra/firefox/patches/rust-1.45.0.patch
Normal file
@ -0,0 +1,269 @@
|
||||
From 728d47506fe3a2599818060bd6e02e4bd3e338d5 Mon Sep 17 00:00:00 2001
|
||||
From: Jubilee Young <workingjubilee@gmail.com>
|
||||
Date: Sat, 15 May 2021 20:15:42 -0700
|
||||
Subject: [PATCH] Update shuffle API for const generics
|
||||
|
||||
---
|
||||
src/api/shuffle.rs | 46 +++++++++----------
|
||||
src/codegen/llvm.rs | 109 ++++++++++++++++++++++++++------------------
|
||||
src/lib.rs | 3 ++
|
||||
3 files changed, 90 insertions(+), 68 deletions(-)
|
||||
|
||||
diff --git a/third_party/rust/packed_simd/src/api/shuffle.rs b/src/api/shuffle.rs
|
||||
index da80b912..fda29ccd 100644
|
||||
--- a/third_party/rust/packed_simd/src/api/shuffle.rs
|
||||
+++ b/third_party/rust/packed_simd/src/api/shuffle.rs
|
||||
@@ -75,20 +75,18 @@ macro_rules! shuffle {
|
||||
($vec0:expr, $vec1:expr, [$l0:expr, $l1:expr]) => {{
|
||||
#[allow(unused_unsafe)]
|
||||
unsafe {
|
||||
- $crate::Simd($crate::__shuffle_vector2(
|
||||
+ $crate::Simd($crate::__shuffle_vector2::<{[$l0, $l1]}, _, _>(
|
||||
$vec0.0,
|
||||
$vec1.0,
|
||||
- [$l0, $l1],
|
||||
))
|
||||
}
|
||||
}};
|
||||
($vec0:expr, $vec1:expr, [$l0:expr, $l1:expr, $l2:expr, $l3:expr]) => {{
|
||||
#[allow(unused_unsafe)]
|
||||
unsafe {
|
||||
- $crate::Simd($crate::__shuffle_vector4(
|
||||
+ $crate::Simd($crate::__shuffle_vector4::<{[$l0, $l1, $l2, $l3]}, _, _>(
|
||||
$vec0.0,
|
||||
$vec1.0,
|
||||
- [$l0, $l1, $l2, $l3],
|
||||
))
|
||||
}
|
||||
}};
|
||||
@@ -97,10 +95,9 @@ macro_rules! shuffle {
|
||||
$l4:expr, $l5:expr, $l6:expr, $l7:expr]) => {{
|
||||
#[allow(unused_unsafe)]
|
||||
unsafe {
|
||||
- $crate::Simd($crate::__shuffle_vector8(
|
||||
+ $crate::Simd($crate::__shuffle_vector8::<{[$l0, $l1, $l2, $l3, $l4, $l5, $l6, $l7]}, _, _>(
|
||||
$vec0.0,
|
||||
$vec1.0,
|
||||
- [$l0, $l1, $l2, $l3, $l4, $l5, $l6, $l7],
|
||||
))
|
||||
}
|
||||
}};
|
||||
@@ -111,13 +108,14 @@ macro_rules! shuffle {
|
||||
$l12:expr, $l13:expr, $l14:expr, $l15:expr]) => {{
|
||||
#[allow(unused_unsafe)]
|
||||
unsafe {
|
||||
- $crate::Simd($crate::__shuffle_vector16(
|
||||
- $vec0.0,
|
||||
- $vec1.0,
|
||||
+ $crate::Simd($crate::__shuffle_vector16::<{
|
||||
[
|
||||
$l0, $l1, $l2, $l3, $l4, $l5, $l6, $l7, $l8, $l9, $l10,
|
||||
$l11, $l12, $l13, $l14, $l15,
|
||||
- ],
|
||||
+ ]
|
||||
+ }, _, _>(
|
||||
+ $vec0.0,
|
||||
+ $vec1.0,
|
||||
))
|
||||
}
|
||||
}};
|
||||
@@ -132,15 +130,16 @@ macro_rules! shuffle {
|
||||
$l28:expr, $l29:expr, $l30:expr, $l31:expr]) => {{
|
||||
#[allow(unused_unsafe)]
|
||||
unsafe {
|
||||
- $crate::Simd($crate::__shuffle_vector32(
|
||||
- $vec0.0,
|
||||
- $vec1.0,
|
||||
+ $crate::Simd($crate::__shuffle_vector32::<{
|
||||
[
|
||||
$l0, $l1, $l2, $l3, $l4, $l5, $l6, $l7, $l8, $l9, $l10,
|
||||
$l11, $l12, $l13, $l14, $l15, $l16, $l17, $l18, $l19,
|
||||
$l20, $l21, $l22, $l23, $l24, $l25, $l26, $l27, $l28,
|
||||
$l29, $l30, $l31,
|
||||
- ],
|
||||
+ ]
|
||||
+ }, _, _>(
|
||||
+ $vec0.0,
|
||||
+ $vec1.0,
|
||||
))
|
||||
}
|
||||
}};
|
||||
@@ -163,18 +162,17 @@ macro_rules! shuffle {
|
||||
$l60:expr, $l61:expr, $l62:expr, $l63:expr]) => {{
|
||||
#[allow(unused_unsafe)]
|
||||
unsafe {
|
||||
- $crate::Simd($crate::__shuffle_vector64(
|
||||
+ $crate::Simd($crate::__shuffle_vector64::<{[
|
||||
+ $l0, $l1, $l2, $l3, $l4, $l5, $l6, $l7, $l8, $l9, $l10,
|
||||
+ $l11, $l12, $l13, $l14, $l15, $l16, $l17, $l18, $l19,
|
||||
+ $l20, $l21, $l22, $l23, $l24, $l25, $l26, $l27, $l28,
|
||||
+ $l29, $l30, $l31, $l32, $l33, $l34, $l35, $l36, $l37,
|
||||
+ $l38, $l39, $l40, $l41, $l42, $l43, $l44, $l45, $l46,
|
||||
+ $l47, $l48, $l49, $l50, $l51, $l52, $l53, $l54, $l55,
|
||||
+ $l56, $l57, $l58, $l59, $l60, $l61, $l62, $l63,
|
||||
+ ]}, _, _>(
|
||||
$vec0.0,
|
||||
$vec1.0,
|
||||
- [
|
||||
- $l0, $l1, $l2, $l3, $l4, $l5, $l6, $l7, $l8, $l9, $l10,
|
||||
- $l11, $l12, $l13, $l14, $l15, $l16, $l17, $l18, $l19,
|
||||
- $l20, $l21, $l22, $l23, $l24, $l25, $l26, $l27, $l28,
|
||||
- $l29, $l30, $l31, $l32, $l33, $l34, $l35, $l36, $l37,
|
||||
- $l38, $l39, $l40, $l41, $l42, $l43, $l44, $l45, $l46,
|
||||
- $l47, $l48, $l49, $l50, $l51, $l52, $l53, $l54, $l55,
|
||||
- $l56, $l57, $l58, $l59, $l60, $l61, $l62, $l63,
|
||||
- ],
|
||||
))
|
||||
}
|
||||
}};
|
||||
diff --git a/third_party/rust/packed_simd/src/codegen/llvm.rs b/src/codegen/llvm.rs
|
||||
index 93c6ce6b..52b11a95 100644
|
||||
--- a/third_party/rust/packed_simd/src/codegen/llvm.rs
|
||||
+++ b/third_party/rust/packed_simd/src/codegen/llvm.rs
|
||||
@@ -7,52 +7,73 @@ use crate::sealed::Simd;
|
||||
|
||||
// Shuffle intrinsics: expanded in users' crates, therefore public.
|
||||
extern "platform-intrinsic" {
|
||||
- // FIXME: Passing this intrinsics an `idx` array with an index that is
|
||||
- // out-of-bounds will produce a monomorphization-time error.
|
||||
- // https://github.com/rust-lang-nursery/packed_simd/issues/21
|
||||
- #[rustc_args_required_const(2)]
|
||||
- pub fn simd_shuffle2<T, U>(x: T, y: T, idx: [u32; 2]) -> U
|
||||
- where
|
||||
- T: Simd,
|
||||
- <T as Simd>::Element: Shuffle<[u32; 2], Output = U>;
|
||||
-
|
||||
- #[rustc_args_required_const(2)]
|
||||
- pub fn simd_shuffle4<T, U>(x: T, y: T, idx: [u32; 4]) -> U
|
||||
- where
|
||||
- T: Simd,
|
||||
- <T as Simd>::Element: Shuffle<[u32; 4], Output = U>;
|
||||
-
|
||||
- #[rustc_args_required_const(2)]
|
||||
- pub fn simd_shuffle8<T, U>(x: T, y: T, idx: [u32; 8]) -> U
|
||||
- where
|
||||
- T: Simd,
|
||||
- <T as Simd>::Element: Shuffle<[u32; 8], Output = U>;
|
||||
-
|
||||
- #[rustc_args_required_const(2)]
|
||||
- pub fn simd_shuffle16<T, U>(x: T, y: T, idx: [u32; 16]) -> U
|
||||
- where
|
||||
- T: Simd,
|
||||
- <T as Simd>::Element: Shuffle<[u32; 16], Output = U>;
|
||||
-
|
||||
- #[rustc_args_required_const(2)]
|
||||
- pub fn simd_shuffle32<T, U>(x: T, y: T, idx: [u32; 32]) -> U
|
||||
- where
|
||||
- T: Simd,
|
||||
- <T as Simd>::Element: Shuffle<[u32; 32], Output = U>;
|
||||
-
|
||||
- #[rustc_args_required_const(2)]
|
||||
- pub fn simd_shuffle64<T, U>(x: T, y: T, idx: [u32; 64]) -> U
|
||||
- where
|
||||
- T: Simd,
|
||||
- <T as Simd>::Element: Shuffle<[u32; 64], Output = U>;
|
||||
+ pub fn simd_shuffle2<T, U>(x: T, y: T, idx: [u32; 2]) -> U;
|
||||
+ pub fn simd_shuffle4<T, U>(x: T, y: T, idx: [u32; 4]) -> U;
|
||||
+ pub fn simd_shuffle8<T, U>(x: T, y: T, idx: [u32; 8]) -> U;
|
||||
+ pub fn simd_shuffle16<T, U>(x: T, y: T, idx: [u32; 16]) -> U;
|
||||
+ pub fn simd_shuffle32<T, U>(x: T, y: T, idx: [u32; 32]) -> U;
|
||||
+ pub fn simd_shuffle64<T, U>(x: T, y: T, idx: [u32; 64]) -> U;
|
||||
}
|
||||
|
||||
-pub use self::simd_shuffle16 as __shuffle_vector16;
|
||||
-pub use self::simd_shuffle2 as __shuffle_vector2;
|
||||
-pub use self::simd_shuffle32 as __shuffle_vector32;
|
||||
-pub use self::simd_shuffle4 as __shuffle_vector4;
|
||||
-pub use self::simd_shuffle64 as __shuffle_vector64;
|
||||
-pub use self::simd_shuffle8 as __shuffle_vector8;
|
||||
+#[allow(clippy::missing_safety_doc)]
|
||||
+#[inline]
|
||||
+pub unsafe fn __shuffle_vector2<const IDX: [u32; 2], T, U>(x: T, y: T) -> U
|
||||
+where
|
||||
+ T: Simd,
|
||||
+ <T as Simd>::Element: Shuffle<[u32; 2], Output = U>,
|
||||
+{
|
||||
+ simd_shuffle2(x, y, IDX)
|
||||
+}
|
||||
+
|
||||
+#[allow(clippy::missing_safety_doc)]
|
||||
+#[inline]
|
||||
+pub unsafe fn __shuffle_vector4<const IDX: [u32; 4], T, U>(x: T, y: T) -> U
|
||||
+where
|
||||
+ T: Simd,
|
||||
+ <T as Simd>::Element: Shuffle<[u32; 4], Output = U>,
|
||||
+{
|
||||
+ simd_shuffle4(x, y, IDX)
|
||||
+}
|
||||
+
|
||||
+#[allow(clippy::missing_safety_doc)]
|
||||
+#[inline]
|
||||
+pub unsafe fn __shuffle_vector8<const IDX: [u32; 8], T, U>(x: T, y: T) -> U
|
||||
+where
|
||||
+ T: Simd,
|
||||
+ <T as Simd>::Element: Shuffle<[u32; 8], Output = U>,
|
||||
+{
|
||||
+ simd_shuffle8(x, y, IDX)
|
||||
+}
|
||||
+
|
||||
+#[allow(clippy::missing_safety_doc)]
|
||||
+#[inline]
|
||||
+pub unsafe fn __shuffle_vector16<const IDX: [u32; 16], T, U>(x: T, y: T) -> U
|
||||
+where
|
||||
+ T: Simd,
|
||||
+ <T as Simd>::Element: Shuffle<[u32; 16], Output = U>,
|
||||
+{
|
||||
+ simd_shuffle16(x, y, IDX)
|
||||
+}
|
||||
+
|
||||
+#[allow(clippy::missing_safety_doc)]
|
||||
+#[inline]
|
||||
+pub unsafe fn __shuffle_vector32<const IDX: [u32; 32], T, U>(x: T, y: T) -> U
|
||||
+where
|
||||
+ T: Simd,
|
||||
+ <T as Simd>::Element: Shuffle<[u32; 32], Output = U>,
|
||||
+{
|
||||
+ simd_shuffle32(x, y, IDX)
|
||||
+}
|
||||
+
|
||||
+#[allow(clippy::missing_safety_doc)]
|
||||
+#[inline]
|
||||
+pub unsafe fn __shuffle_vector64<const IDX: [u32; 64], T, U>(x: T, y: T) -> U
|
||||
+where
|
||||
+ T: Simd,
|
||||
+ <T as Simd>::Element: Shuffle<[u32; 64], Output = U>,
|
||||
+{
|
||||
+ simd_shuffle64(x, y, IDX)
|
||||
+}
|
||||
|
||||
extern "platform-intrinsic" {
|
||||
crate fn simd_eq<T, U>(x: T, y: T) -> U;
|
||||
diff --git a/third_party/rust/packed_simd/src/lib.rs
|
||||
b/third_party/rust/packed_simd/src/lib.rs
|
||||
index 9c9b060..cccdb85 100644
|
||||
--- a/third_party/rust/packed_simd/src/lib.rs
|
||||
+++ b/third_party/rust/packed_simd/src/lib.rs
|
||||
@@ -200,6 +200,7 @@
|
||||
//! preserving, etc.
|
||||
|
||||
#![feature(
|
||||
+ const_generics,
|
||||
repr_simd,
|
||||
rustc_attrs,
|
||||
platform_intrinsics,
|
||||
@@ -216,6 +217,7 @@
|
||||
// FIXME: these types are unsound in C FFI already
|
||||
// See https://github.com/rust-lang/rust/issues/53346
|
||||
improper_ctypes_definitions,
|
||||
+ incomplete_features,
|
||||
clippy::cast_possible_truncation,
|
||||
clippy::cast_lossless,
|
||||
clippy::cast_possible_wrap,
|
||||
@@ -226,6 +228,7 @@
|
||||
// See https://github.com/rust-lang/rust-clippy/issues/3410
|
||||
clippy::use_self,
|
||||
clippy::wrong_self_convention,
|
||||
+ clippy::from_over_into,
|
||||
)]
|
||||
#![cfg_attr(test, feature(hashmap_internals))]
|
||||
#![deny(rust_2018_idioms, clippy::missing_inline_in_public_items)]
|
@ -3,3 +3,4 @@ https://ftp.gnu.org/gnu/autoconf/autoconf-2.13.tar.gz autoconf2.13/
|
||||
https://github.com/yasm/yasm/releases/download/v1.3.0/yasm-1.3.0.tar.gz yasm
|
||||
https://fossies.org/linux/misc/zip30.tar.gz zip
|
||||
patches/no-x11.patch
|
||||
patches/rust-1.45.0.patch
|
||||
|
Loading…
Reference in New Issue
Block a user