mirror of
https://codeberg.org/kiss-community/repo
synced 2024-07-04 23:12:28 +00:00
firefox: 91.0
This commit is contained in:
parent
219a80ee86
commit
8139aaec7f
|
@ -1,126 +0,0 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
patch -p1 < no-x11.patch
|
||||
|
||||
# X11-less webrtc patch from bugzilla. Very large so a
|
||||
# URL is used.
|
||||
patch -p1 < attachment.cgi\?id=9202429
|
||||
|
||||
# Remove fribidi dependency.
|
||||
sed '/fribidi/d' config/system-headers.mozbuild > _
|
||||
mv -f _ config/system-headers.mozbuild
|
||||
|
||||
# Remove libc header which conflicts with 7 or so Linux
|
||||
# kernel headers. See: https://github.com/kisslinux/repo/issues/207
|
||||
_f=dom/media/webrtc/transport/third_party/nICEr/src/stun/addrs-netlink.c
|
||||
sed '/net\/if/d' "$_f" > _
|
||||
mv -f _ "$_f"
|
||||
|
||||
# Build autoconf 2.13 for Firefox's sole use.
|
||||
# See: https://bugzilla.mozilla.org/show_bug.cgi?id=104642
|
||||
(
|
||||
cd autoconf2.13
|
||||
|
||||
./configure \
|
||||
--prefix="$PWD/../junk" \
|
||||
--program-suffix=-2.13
|
||||
|
||||
make
|
||||
make install
|
||||
)
|
||||
|
||||
# Build yasm for Firefox's sole use.
|
||||
# Firefox is the only package which needs it
|
||||
# and upstream is kinda dead.
|
||||
(
|
||||
cd yasm
|
||||
|
||||
./configure \
|
||||
--prefix=/
|
||||
|
||||
make
|
||||
make DESTDIR="$PWD/../junk" install
|
||||
)
|
||||
|
||||
# Build zip for Firefox's sole use.
|
||||
# Zip is an awful format that we should use
|
||||
# as little as possible.
|
||||
(
|
||||
cd zip
|
||||
|
||||
make \
|
||||
CC="$CC $CFLAGS $CXXFLAGS" \
|
||||
-f unix/Makefile generic
|
||||
|
||||
make \
|
||||
prefix="$PWD/../junk" \
|
||||
-f unix/Makefile install
|
||||
)
|
||||
|
||||
export PATH="$PWD/junk/bin:$PATH"
|
||||
|
||||
# If using libc++, CXXSTDLIB needs to be set manually.
|
||||
case $("$CC" -print-file-name=libc++.so) in */*)
|
||||
export CXXSTDLIB=c++
|
||||
esac
|
||||
|
||||
export LDFLAGS="$LDFLAGS -Wl,-rpath=/usr/lib/firefox,--enable-new-dtags"
|
||||
export RUSTFLAGS="$RUSTFLAGS -Cdebuginfo=0"
|
||||
export MACH_USE_SYSTEM_PYTHON=1
|
||||
export MOZ_DEBUG_FLAGS=-g0
|
||||
export MOZ_NOSPAM=1
|
||||
|
||||
cat > .mozconfig << EOF
|
||||
ac_add_options --enable-default-toolkit=cairo-gtk3-wayland
|
||||
ac_add_options --prefix=/usr
|
||||
ac_add_options --libdir=/usr/lib
|
||||
ac_add_options --enable-alsa
|
||||
ac_add_options --enable-strip
|
||||
ac_add_options --enable-release
|
||||
ac_add_options --enable-rust-simd
|
||||
ac_add_options --enable-install-strip
|
||||
ac_add_options --enable-official-branding
|
||||
ac_add_options --enable-application=browser
|
||||
ac_add_options --enable-optimize="${CFLAGS:-} -w"
|
||||
ac_add_options --with-system-libvpx
|
||||
ac_add_options --with-system-ffi
|
||||
ac_add_options --with-system-png
|
||||
ac_add_options --with-system-jpeg
|
||||
ac_add_options --with-system-zlib
|
||||
ac_add_options --with-system-pixman
|
||||
ac_add_options --without-system-nss
|
||||
ac_add_options --without-system-nspr
|
||||
ac_add_options --disable-eme
|
||||
ac_add_options --disable-dbus
|
||||
ac_add_options --disable-gold
|
||||
ac_add_options --disable-tests
|
||||
ac_add_options --disable-vtune
|
||||
ac_add_options --disable-updater
|
||||
ac_add_options --disable-jemalloc
|
||||
ac_add_options --disable-elf-hack
|
||||
ac_add_options --disable-callgrind
|
||||
ac_add_options --disable-profiling
|
||||
ac_add_options --disable-necko-wifi
|
||||
ac_add_options --disable-crashreporter
|
||||
ac_add_options --disable-pulseaudio
|
||||
ac_add_options --disable-accessibility
|
||||
ac_add_options --disable-debug
|
||||
ac_add_options --disable-debug-symbols
|
||||
ac_add_options --disable-parental-controls
|
||||
ac_add_options --disable-system-extension-dirs
|
||||
EOF
|
||||
|
||||
./mach build
|
||||
./mach install
|
||||
|
||||
# Remove a lot of uneeded "stuff".
|
||||
rm -rf \
|
||||
"$1/usr/include" \
|
||||
"$1/usr/lib/firefox-devel" \
|
||||
"$1/usr/share/idl" \
|
||||
"$1/usr/lib/firefox/browser/features/fxmonitor@mozilla.org.xpi" \
|
||||
"$1/usr/lib/firefox/browser/features/screenshots@mozilla.org.xpi" \
|
||||
"$1/usr/lib/firefox/browser/features/webcompat-reporter@mozilla.org.xpi" \
|
||||
"$1/usr/lib/firefox/browser/features/webcompat@mozilla.org.xpi" \
|
||||
"$1/usr/lib/firefox/browser/features/doh-rollout@mozilla.org.xpi"
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
33b0fae01ce299351a144548336566ffe7db76c29c37e950377580de892b0085
|
||||
f0611136bee505811e9ca11ca7ac188ef5323a8e2ef19cffd3edb3cf08fd791e
|
||||
3dce6601b495f5b3d45b59f7d2492a340ee7e84b5beca17e48f862502bd5603f
|
||||
f0e8bb1f9b7eb0b01285495a2699df3a4b766784c1765a8f1aeedf63c0806369
|
||||
e2d75a4524f80c310b53f46afcffa6c1fad76393bb1dde6d6d37176036efd918
|
||||
47d30d0b73d3174f8ebbb6d686892fa5435beb3355ddacded70194ef0249ba51
|
|
@ -1,31 +0,0 @@
|
|||
alsa-lib
|
||||
atk
|
||||
bzip2
|
||||
cairo
|
||||
cbindgen make
|
||||
clang make
|
||||
expat
|
||||
ffmpeg
|
||||
fontconfig
|
||||
freetype-harfbuzz
|
||||
gdk-pixbuf
|
||||
glib
|
||||
gtk+3
|
||||
libdrm
|
||||
libffi
|
||||
libjpeg-turbo
|
||||
libpng
|
||||
libvpx
|
||||
llvm make
|
||||
m4 make
|
||||
mesa
|
||||
nasm make
|
||||
nodejs make
|
||||
pango
|
||||
perl make
|
||||
pixman
|
||||
pkgconf make
|
||||
python make
|
||||
rust make
|
||||
wayland
|
||||
zlib
|
File diff suppressed because it is too large
Load Diff
|
@ -1,12 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
cat <<EOF
|
||||
|
||||
Run 'kiss help firefox' for setup
|
||||
information and general troubleshooting.
|
||||
|
||||
Also available here:
|
||||
|
||||
https://kisslinux.org/wiki/software/firefox
|
||||
|
||||
EOF
|
|
@ -1,6 +0,0 @@
|
|||
https://ftp.mozilla.org/pub/firefox/releases/VERSION/source/firefox-VERSION.source.tar.xz
|
||||
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
|
||||
https://bugzilla.mozilla.org/attachment.cgi?id=9202429
|
|
@ -1 +0,0 @@
|
|||
91.0b9 2
|
|
@ -2,28 +2,30 @@
|
|||
|
||||
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.54.0.patch
|
||||
}
|
||||
# X11-less webrtc patch from bugzilla. Very large so a URL is used.
|
||||
patch -p1 < attachment.cgi\?id=9202429
|
||||
|
||||
# Remove fribidi dependency.
|
||||
sed '/fribidi/d' config/system-headers.mozbuild > _
|
||||
mv -f _ config/system-headers.mozbuild
|
||||
|
||||
# Remove libc header which conflicts with 7 or so Linux
|
||||
# kernel headers. See: https://github.com/kisslinux/repo/issues/207
|
||||
# Remove libc header which conflicts with 7 or so Linux kernel headers.
|
||||
# See: https://github.com/kisslinux/repo/issues/207
|
||||
_f=dom/media/webrtc/transport/third_party/nICEr/src/stun/addrs-netlink.c
|
||||
sed '/net\/if/d' "$_f" > _
|
||||
mv -f _ "$_f"
|
||||
|
||||
# The most recent version of Clang is able to build NSS with its integrated
|
||||
# assembler.
|
||||
for f in \
|
||||
security/nss/lib/freebl/Makefile \
|
||||
security/nss/lib/freebl/freebl.gyp \
|
||||
security/nss/lib/freebl/freebl_base.gypi
|
||||
do
|
||||
sed '/-no-integrated-as/d' "$f" > _
|
||||
mv -f _ "$f"
|
||||
done
|
||||
|
||||
# Build autoconf 2.13 for Firefox's sole use.
|
||||
# See: https://bugzilla.mozilla.org/show_bug.cgi?id=104642
|
||||
(
|
||||
|
@ -118,13 +120,6 @@ ac_add_options --disable-parental-controls
|
|||
ac_add_options --disable-system-extension-dirs
|
||||
EOF
|
||||
|
||||
# Currently required for X11-less builds.
|
||||
# See: https://bugzilla.mozilla.org/show_bug.cgi?id=1661450
|
||||
# https://bugzilla.mozilla.org/show_bug.cgi?id=1654112
|
||||
cat >> .mozconfig <<EOF
|
||||
ac_add_options --disable-webrtc
|
||||
EOF
|
||||
|
||||
./mach build
|
||||
./mach install
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
35c45dbc21a7bd59e5daa6b3fef7a08c51ff0a1333f47a355bb1cbc840c3ff59
|
||||
2a4d1f788ab77f68380d4e6ab0b36bd1efd1a4ac9e9c6d10e39377894c077901
|
||||
f0611136bee505811e9ca11ca7ac188ef5323a8e2ef19cffd3edb3cf08fd791e
|
||||
3dce6601b495f5b3d45b59f7d2492a340ee7e84b5beca17e48f862502bd5603f
|
||||
f0e8bb1f9b7eb0b01285495a2699df3a4b766784c1765a8f1aeedf63c0806369
|
||||
a88ecf15a164dd82f9deb6576ff744d4ed1fda7ebd273e63b01e0c1d93c9ed1d
|
||||
8346ee5ef1aa1aea53d76d50044af84f7a26468fd1fa7e9f7a0d5819ed4d81bb
|
||||
e2d75a4524f80c310b53f46afcffa6c1fad76393bb1dde6d6d37176036efd918
|
||||
47d30d0b73d3174f8ebbb6d686892fa5435beb3355ddacded70194ef0249ba51
|
||||
|
|
|
@ -53,10 +53,10 @@ index 12d1a497b9..bec4cd17f0 100644
|
|||
# define GL_CONTEXT_PROVIDER_DEFAULT GLContextProviderEGL
|
||||
#endif
|
||||
diff --git a/gfx/gl/GLContextProviderWayland.cpp b/gfx/gl/GLContextProviderWayland.cpp
|
||||
index 36ecf5032a..78e34bfaf0 100644
|
||||
index 3f1f926cd9..6b61708be9 100644
|
||||
--- a/gfx/gl/GLContextProviderWayland.cpp
|
||||
+++ b/gfx/gl/GLContextProviderWayland.cpp
|
||||
@@ -14,47 +14,65 @@ namespace mozilla::gl {
|
||||
@@ -14,7 +14,9 @@ namespace mozilla::gl {
|
||||
using namespace mozilla::gfx;
|
||||
using namespace mozilla::widget;
|
||||
|
||||
|
@ -65,63 +65,52 @@ index 36ecf5032a..78e34bfaf0 100644
|
|||
+#endif
|
||||
static class GLContextProviderEGL sGLContextProviderEGL;
|
||||
|
||||
already_AddRefed<GLContext> GLContextProviderWayland::CreateForCompositorWidget(
|
||||
CompositorWidget* aCompositorWidget, bool aHardwareWebRender,
|
||||
bool aForceAccelerated) {
|
||||
+#ifdef MOZ_X11
|
||||
if (GdkIsX11Display()) {
|
||||
return sGLContextProviderX11.CreateForCompositorWidget(
|
||||
aCompositorWidget, aHardwareWebRender, aForceAccelerated);
|
||||
} else {
|
||||
+#endif
|
||||
// Note that if there is no GTK display, `GdkIsX11Display` and
|
||||
@@ -33,9 +35,11 @@ already_AddRefed<GLContext> GLContextProviderWayland::CreateForCompositorWidget(
|
||||
if (GdkIsWaylandDisplay()) {
|
||||
return sGLContextProviderEGL.CreateForCompositorWidget(
|
||||
aCompositorWidget, aHardwareWebRender, aForceAccelerated);
|
||||
+#ifdef MOZ_X11
|
||||
}
|
||||
} else {
|
||||
return sGLContextProviderX11.CreateForCompositorWidget(
|
||||
aCompositorWidget, aHardwareWebRender, aForceAccelerated);
|
||||
+#endif
|
||||
}
|
||||
}
|
||||
|
||||
/*static*/
|
||||
already_AddRefed<GLContext> GLContextProviderWayland::CreateHeadless(
|
||||
@@ -44,8 +48,10 @@ already_AddRefed<GLContext> GLContextProviderWayland::CreateHeadless(
|
||||
const GLContextCreateDesc& desc, nsACString* const out_failureId) {
|
||||
+#ifdef MOZ_X11
|
||||
if (GdkIsX11Display()) {
|
||||
return sGLContextProviderX11.CreateHeadless(desc, out_failureId);
|
||||
} else {
|
||||
+#endif
|
||||
if (GdkIsWaylandDisplay()) {
|
||||
return sGLContextProviderEGL.CreateHeadless(desc, out_failureId);
|
||||
+#ifdef MOZ_X11
|
||||
}
|
||||
} else {
|
||||
return sGLContextProviderX11.CreateHeadless(desc, out_failureId);
|
||||
+#endif
|
||||
}
|
||||
}
|
||||
|
||||
/*static*/
|
||||
@@ -53,8 +59,10 @@ already_AddRefed<GLContext> GLContextProviderWayland::CreateHeadless(
|
||||
GLContext* GLContextProviderWayland::GetGlobalContext() {
|
||||
+#ifdef MOZ_X11
|
||||
if (GdkIsX11Display()) {
|
||||
return sGLContextProviderX11.GetGlobalContext();
|
||||
} else {
|
||||
+#endif
|
||||
if (GdkIsWaylandDisplay()) {
|
||||
return sGLContextProviderEGL.GetGlobalContext();
|
||||
+#ifdef MOZ_X11
|
||||
}
|
||||
} else {
|
||||
return sGLContextProviderX11.GetGlobalContext();
|
||||
+#endif
|
||||
}
|
||||
}
|
||||
|
||||
/*static*/
|
||||
@@ -62,8 +70,10 @@ GLContext* GLContextProviderWayland::GetGlobalContext() {
|
||||
void GLContextProviderWayland::Shutdown() {
|
||||
+#ifdef MOZ_X11
|
||||
if (GdkIsX11Display()) {
|
||||
sGLContextProviderX11.Shutdown();
|
||||
} else {
|
||||
+#endif
|
||||
if (GdkIsWaylandDisplay()) {
|
||||
sGLContextProviderEGL.Shutdown();
|
||||
+#ifdef MOZ_X11
|
||||
}
|
||||
} else {
|
||||
sGLContextProviderX11.Shutdown();
|
||||
+#endif
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace mozilla::gl
|
||||
diff --git a/gfx/gl/moz.build b/gfx/gl/moz.build
|
||||
index 62ad33c786..481fc6d432 100644
|
||||
--- a/gfx/gl/moz.build
|
||||
|
@ -178,20 +167,20 @@ index 2ecd55b16a..82b56300c6 100644
|
|||
compositor = new X11BasicCompositor(this, mWidget);
|
||||
} else
|
||||
diff --git a/gfx/thebes/gfxPlatformGtk.cpp b/gfx/thebes/gfxPlatformGtk.cpp
|
||||
index 6a703edcf3..b6ad44212c 100644
|
||||
index 12e01681c7..860e876550 100644
|
||||
--- a/gfx/thebes/gfxPlatformGtk.cpp
|
||||
+++ b/gfx/thebes/gfxPlatformGtk.cpp
|
||||
@@ -61,6 +61,9 @@
|
||||
@@ -62,6 +62,9 @@
|
||||
# include "mozilla/widget/nsWaylandDisplay.h"
|
||||
# include "mozilla/widget/DMABufLibWrapper.h"
|
||||
# include "mozilla/StaticPrefs_widget.h"
|
||||
+# ifdef MOZ_WIGET_GTK
|
||||
+# ifdef MOZ_WIDGET_GTK
|
||||
+# include "mozilla/WidgetUtilsGtk.h"
|
||||
+# endif
|
||||
#endif
|
||||
|
||||
#define GDK_PIXMAP_SIZE_MAX 32767
|
||||
@@ -96,7 +99,11 @@ gfxPlatformGtk::gfxPlatformGtk() {
|
||||
@@ -97,7 +100,11 @@ gfxPlatformGtk::gfxPlatformGtk() {
|
||||
}
|
||||
|
||||
mMaxGenericSubstitutions = UNINITIALIZED_VALUE;
|
||||
|
@ -203,23 +192,11 @@ index 6a703edcf3..b6ad44212c 100644
|
|||
if (XRE_IsParentProcess()) {
|
||||
#ifdef MOZ_X11
|
||||
if (mIsX11Display && mozilla::Preferences::GetBool("gfx.xrender.enabled")) {
|
||||
@@ -250,9 +257,11 @@ void gfxPlatformGtk::InitWebRenderConfig() {
|
||||
}
|
||||
|
||||
void gfxPlatformGtk::FlushContentDrawing() {
|
||||
+#ifdef MOZ_X11
|
||||
if (gfxVars::UseXRender()) {
|
||||
XFlush(DefaultXDisplay());
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
|
||||
void gfxPlatformGtk::InitPlatformGPUProcessPrefs() {
|
||||
diff --git a/gfx/thebes/moz.build b/gfx/thebes/moz.build
|
||||
index c284127164..be9e10542b 100644
|
||||
index baa7005a8f..387dd29276 100644
|
||||
--- a/gfx/thebes/moz.build
|
||||
+++ b/gfx/thebes/moz.build
|
||||
@@ -119,7 +119,6 @@ elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
|
||||
@@ -118,7 +118,6 @@ elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
|
||||
]
|
||||
EXPORTS.mozilla.gfx += [
|
||||
"PrintTargetPDF.h",
|
||||
|
@ -227,7 +204,7 @@ index c284127164..be9e10542b 100644
|
|||
]
|
||||
SOURCES += [
|
||||
"gfxFcPlatformFontList.cpp",
|
||||
@@ -128,17 +127,18 @@ elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
|
||||
@@ -127,13 +126,13 @@ elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
|
||||
"gfxGdkNativeRenderer.cpp",
|
||||
"gfxPlatformGtk.cpp",
|
||||
"PrintTargetPDF.cpp",
|
||||
|
@ -240,9 +217,12 @@ index c284127164..be9e10542b 100644
|
|||
"gfxXlibSurface.h",
|
||||
+ "PrintTargetPS.h",
|
||||
]
|
||||
SOURCES += [
|
||||
EXPORTS.mozilla.gfx += [
|
||||
"XlibDisplay.h",
|
||||
@@ -142,6 +141,7 @@ elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
|
||||
"gfxXlibNativeRenderer.cpp",
|
||||
"gfxXlibSurface.cpp",
|
||||
"XlibDisplay.cpp",
|
||||
+ "PrintTargetPS.cpp",
|
||||
]
|
||||
|
||||
|
@ -496,20 +476,6 @@ index 4515f4ccc0..2f4795364c 100644
|
|||
// CompositorWidgetParent should implement CompositorWidget and
|
||||
// PCompositorWidgetParent.
|
||||
class CompositorWidgetParent;
|
||||
diff --git a/widget/gtk/GtkCompositorWidget.cpp b/widget/gtk/GtkCompositorWidget.cpp
|
||||
index d74539c464..5beec1cdfa 100644
|
||||
--- a/widget/gtk/GtkCompositorWidget.cpp
|
||||
+++ b/widget/gtk/GtkCompositorWidget.cpp
|
||||
@@ -9,7 +9,9 @@
|
||||
#include "mozilla/widget/InProcessCompositorWidget.h"
|
||||
#include "mozilla/widget/PlatformWidgetTypes.h"
|
||||
#include "nsWindow.h"
|
||||
+#ifdef MOZ_X11
|
||||
#include "mozilla/X11Util.h"
|
||||
+#endif
|
||||
|
||||
#ifdef MOZ_WAYLAND
|
||||
# include "mozilla/layers/NativeLayerWayland.h"
|
||||
diff --git a/widget/gtk/MozContainer.cpp b/widget/gtk/MozContainer.cpp
|
||||
index a1c1c2b124..97d31ba5b7 100644
|
||||
--- a/widget/gtk/MozContainer.cpp
|
||||
|
@ -1520,3 +1486,17 @@ index f882569..1acea03 100644
|
|||
LOCAL_INCLUDES += [
|
||||
"/widget/x11",
|
||||
]
|
||||
diff --git a/gfx/thebes/gfxPlatformGtk.cpp b/gfx/thebes/gfxPlatformGtk.cpp
|
||||
index 12e01681c7..b9f526ff45 100644
|
||||
--- a/gfx/thebes/gfxPlatformGtk.cpp
|
||||
+++ b/gfx/thebes/gfxPlatformGtk.cpp
|
||||
@@ -30,7 +30,9 @@
|
||||
#include "mozilla/FontPropertyTypes.h"
|
||||
#include "mozilla/gfx/2D.h"
|
||||
#include "mozilla/gfx/Logging.h"
|
||||
+#ifdef MOZ_X11
|
||||
#include "mozilla/gfx/XlibDisplay.h"
|
||||
+#endif
|
||||
#include "mozilla/Monitor.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/StaticPrefs_gfx.h"
|
||||
|
|
|
@ -1,269 +0,0 @@
|
|||
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,4 +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.54.0.patch
|
||||
https://bugzilla.mozilla.org/attachment.cgi?id=9202429
|
||||
|
|
|
@ -1 +1 @@
|
|||
90.0.2 1
|
||||
91.0 1
|
||||
|
|
Loading…
Reference in New Issue
Block a user