aboutsummaryrefslogtreecommitdiff
path: root/repos/extra/firefox/fix-target-detection.patch
diff options
context:
space:
mode:
authoremmett1 <emmett1.2miligrams@protonmail.com>2024-05-24 12:22:12 +0800
committeremmett1 <emmett1.2miligrams@protonmail.com>2024-05-24 12:22:12 +0800
commit46ca440e9d6cc606d9c3233021e32d24b25172cf (patch)
treeeeb573e47ac56498fbf74bda6d22fac47038ecab /repos/extra/firefox/fix-target-detection.patch
parent8c2e7bb570c11a51fdcecf7302af4058757d862c (diff)
downloadalicelinux-46ca440e9d6cc606d9c3233021e32d24b25172cf.tar.gz
alicelinux-46ca440e9d6cc606d9c3233021e32d24b25172cf.zip
added repos
Diffstat (limited to 'repos/extra/firefox/fix-target-detection.patch')
-rw-r--r--repos/extra/firefox/fix-target-detection.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/repos/extra/firefox/fix-target-detection.patch b/repos/extra/firefox/fix-target-detection.patch
new file mode 100644
index 00000000..8e115a3d
--- /dev/null
+++ b/repos/extra/firefox/fix-target-detection.patch
@@ -0,0 +1,19 @@
+diff --git a/build/moz.configure/rust.configure b/build/moz.configure/rust.configure
+index 7a2fd1a..ba5ba62 100644
+--- a/build/moz.configure/rust.configure
++++ b/build/moz.configure/rust.configure
+@@ -403,9 +403,13 @@ def detect_rustc_target(
+ ]
+ if len(narrowed) == 1:
+ return narrowed[0].rust_target
++ elif narrowed:
++ candidates = narrowed
++
++ aliased_vendor = "unknown" if host_or_target.vendor == "pc" else host_or_target.vendor
+
+ # Finally, see if the vendor can be used to disambiguate.
+- narrowed = [c for c in candidates if c.target.vendor == host_or_target.vendor]
++ narrowed = [c for c in candidates if c.target.vendor == aliased_vendor]
+ if len(narrowed) == 1:
+ return narrowed[0].rust_target
+