parameters: (rustc_path)
return_statement: return known_vars["host"]
docstring: Works out the host rustc target.
docstring_summary: Works out the host rustc target.
docstring_tokens: Works out the host rustc target .
function: def host_triple(rustc_path):
    """ Works out the host rustc target. """
    args = [rustc_path, "-vV"]
    known_vars = dict()
    proc = subprocess.Popen(args, stdout=subprocess.PIPE)
    for line in io.TextIOWrapper(proc.stdout, encoding="utf-8"):
      m = RUSTC_VERSION_LINE.match(line.rstrip())
      if m:
        known_vars[m.group(1)] = m.group(2)
    return known_vars["host"]
function_tokens: def host_triple ( rustc_path ) : args = [ rustc_path , "-vV" ] known_vars = dict ( ) proc = subprocess . Popen ( args , stdout = subprocess . PIPE ) for line in io . TextIOWrapper ( proc . stdout , encoding = "utf-8" ) : m = RUSTC_VERSION_LINE . match ( line . rstrip ( ) ) if m : known_vars [ m . group ( 1 ) ] = m . group ( 2 ) return known_vars [ "host" ]