void-packages/srcpkgs/mozjs102/patches/014-rust-target.patch

29 lines
938 B
Diff

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))