fix-rust-target.patch (913B)
1 Allow us to just set RUST_TARGEt ourselves instead of hacking around in mozilla's 2 weird custom build system... 3 4 --- a/build/moz.configure/rust.configure 5 +++ b/build/moz.configure/rust.configure 6 @@ -225,7 +225,9 @@ 7 data.setdefault(key, []).append(namespace(rust_target=t, target=info)) 8 return data 9 10 - 11 +@imports('os') 12 +@imports(_from='mozbuild.util', _import='ensure_unicode') 13 +@imports(_from='mozbuild.util', _import='system_encoding') 14 def detect_rustc_target( 15 host_or_target, compiler_info, arm_target, rust_supported_targets 16 ): 17 @@ -340,13 +342,13 @@ 18 19 return None 20 21 - rustc_target = find_candidate(candidates) 22 + rustc_target = os.environ['RUST_TARGET'] 23 24 if rustc_target is None: 25 die("Don't know how to translate {} for rustc".format(host_or_target.alias)) 26 27 - return rustc_target 28 + return ensure_unicode(rustc_target, system_encoding) 29 30 31 @imports('os')