72 lines
1.9 KiB
Diff
72 lines
1.9 KiB
Diff
Mozilla rustc check does not support crossbuild: let's remove it
|
|
Remove calls to unwrap_rustup, they fail if rustup isn't present
|
|
|
|
Do not try to figure out the rust target as it is broken on musl
|
|
instead use what is set in RUST_TARGET
|
|
|
|
Skip extra checks on cross builds (broken for arm*)
|
|
|
|
--- a/build/moz.configure/rust.configure 2020-12-12 01:35:33.000000000 +0100
|
|
+++ b/build/moz.configure/rust.configure 2020-12-15 19:45:16.467750787 +0100
|
|
@@ -91,9 +91,6 @@
|
|
return unwrap
|
|
|
|
|
|
-rustc = unwrap_rustup(rustc, "rustc")
|
|
-cargo = unwrap_rustup(cargo, "cargo")
|
|
-
|
|
|
|
set_config("CARGO", cargo)
|
|
set_config("RUSTC", rustc)
|
|
@@ -260,7 +257,9 @@
|
|
data.setdefault(key, []).append(namespace(rust_target=t, target=info))
|
|
return data
|
|
|
|
-
|
|
+@imports('os')
|
|
+@imports(_from='mozbuild.util', _import='ensure_unicode')
|
|
+@imports(_from='mozbuild.util', _import='system_encoding')
|
|
def detect_rustc_target(
|
|
host_or_target, compiler_info, arm_target, rust_supported_targets
|
|
):
|
|
@@ -382,12 +381,12 @@
|
|
|
|
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))
|
|
|
|
- return rustc_target
|
|
+ return ensure_unicode(rustc_target, system_encoding)
|
|
|
|
|
|
@imports("os")
|
|
@@ -486,6 +485,7 @@
|
|
host, compiler_info, arm_target, rust_supported_targets
|
|
)
|
|
if rustc_target != rustc_host:
|
|
+ return rustc_host
|
|
if host.alias == rustc_target:
|
|
configure_host = host.alias
|
|
else:
|
|
@@ -507,7 +507,6 @@
|
|
)
|
|
)
|
|
)
|
|
- assert_rust_compile(host, rustc_target, rustc)
|
|
return rustc_target
|
|
|
|
|
|
@@ -521,7 +520,6 @@
|
|
rustc_target = detect_rustc_target(
|
|
target, compiler_info, arm_target, rust_supported_targets
|
|
)
|
|
- assert_rust_compile(target, rustc_target, rustc)
|
|
return rustc_target
|
|
|
|
|
|
|