@depends(rustc, when=rust_compiler)
+@imports('sys')
+@imports(_from='__builtin__', _import='repr')
def rust_supported_targets(rustc):
out = check_cmd_output(rustc, '--print', 'target-list').splitlines()
# The os in the triplets used by rust may match the same OSes, in which
per_os = {}
ambiguous = set()
per_raw_os = {}
+ #HACK: if there are multiple matches the algorithm uses the last one
+ #put arm-unknown-linux-gnuebihf on the end of the list so it gets preffered
+ out.append('arm-unknown-linux-gnueabihf')
for t in out:
+ traw = t
t = split_triplet(t, allow_unknown=True)
endianness = t.endianness
if t.cpu.startswith('thumb') and endianness not in ('big', 'little'):
arm_target, when=rust_compiler)
@checking('for rust %s triplet' % host_or_target_str)
@imports('os')
+ @imports('sys')
@imports('subprocess')
@imports(_from='mozbuild.configure.util', _import='LineIO')
@imports(_from='mozbuild.shellutil', _import='quote')
@imports(_from='tempfile', _import='mkstemp')
@imports(_from='textwrap', _import='dedent')
+ @imports(_from='__builtin__', _import='repr')
def rust_target(rustc, host_or_target, compiler_info,
rust_supported_targets, arm_target):
# Rust's --target options are similar to, but not exactly the same