def _platform_toolchain_cmd_join(cmds):
    """

    >>> cmds = _platform_toolchain_cmd_split(test_build_template)
    >>> out_template = _platform_toolchain_cmd_join(cmds)
    >>> "\\n".join(difflib.context_diff("\\n".join(test_build_template), "\\n".join(out_template)))
    ''
    >>> pprint.pprint(out_template)
    ['yosys -q -l {build_name}.rpt {build_name}.ys',
     'nextpnr-ice40 --json {build_name}.json --pcf {build_name}.pcf',
     'icepack {build_name}.txt {build_name}.bin']

    """
    template = []
    while len(template) < len(cmds):
        for i, cmdline_parts in cmds.values():
            if i != len(template):
                continue
            template.append(" ".join(cmdline_parts))
            break
        else:
            raise ValueError("{} not found\n{}\n{}\n".format(len(template), template, cmds))
    return template