fix-target-detection.patch (801B)
1 diff --git a/build/moz.configure/rust.configure b/build/moz.configure/rust.configure 2 index 7a2fd1a..ba5ba62 100644 3 --- a/build/moz.configure/rust.configure 4 +++ b/build/moz.configure/rust.configure 5 @@ -403,9 +403,13 @@ def detect_rustc_target( 6 ] 7 if len(narrowed) == 1: 8 return narrowed[0].rust_target 9 + elif narrowed: 10 + candidates = narrowed 11 + 12 + aliased_vendor = "unknown" if host_or_target.vendor == "pc" else host_or_target.vendor 13 14 # Finally, see if the vendor can be used to disambiguate. 15 - narrowed = [c for c in candidates if c.target.vendor == host_or_target.vendor] 16 + narrowed = [c for c in candidates if c.target.vendor == aliased_vendor] 17 if len(narrowed) == 1: 18 return narrowed[0].rust_target