fix-rust-target.patch 913 B

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