summaryrefslogtreecommitdiff
path: root/repo/js91/fix-rust-target.patch
blob: 4d8918a2a54c59af1ffab6b05648c7e127d0522f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
commit 34b3ac3195a40757bc5f51a1db5a47a4b18c68b5
Author: Daniel Kolesa <daniel@octaforge.org>
Date:   Sun Jan 23 21:13:38 2022 +0100

    bypass rust triplet checks and just force ours

diff --git a/build/moz.configure/rust.configure b/build/moz.configure/rust.configure
index cd77d72b..0c03cab7 100644
--- a/build/moz.configure/rust.configure
+++ b/build/moz.configure/rust.configure
@@ -261,7 +261,7 @@ def rust_supported_targets(rustc):
         data.setdefault(key, []).append(namespace(rust_target=t, target=info))
     return data
 
-
+@imports("os")
 def detect_rustc_target(
     host_or_target, compiler_info, arm_target, rust_supported_targets
 ):
@@ -383,7 +383,7 @@ def detect_rustc_target(
 
         return None
 
-    rustc_target = find_candidate(candidates)
+    rustc_target = os.environ["RUST_TARGET"]
 
     if rustc_target is None:
         die("Don't know how to translate {} for rustc".format(host_or_target.alias))