(rustc)
| 1519 | return '0.0' |
| 1520 | |
| 1521 | def get_rustc_version(rustc): |
| 1522 | try: |
| 1523 | proc = subprocess.Popen(shlex.split(rustc) + ['--version'], |
| 1524 | stdin=subprocess.PIPE, stderr=subprocess.PIPE, |
| 1525 | stdout=subprocess.PIPE) |
| 1526 | except OSError: |
| 1527 | return '0.0' |
| 1528 | |
| 1529 | with proc: |
| 1530 | rustc_ret = to_utf8(proc.communicate()[0]) |
| 1531 | |
| 1532 | match = re.match(r"rustc ([0-9]+\.[0-9]+\.[0-9]+)", rustc_ret) |
| 1533 | |
| 1534 | if match: |
| 1535 | return match.group(1) |
| 1536 | |
| 1537 | warn(f'Could not recognize `rustc`: {rustc_ret}') |
| 1538 | return '0.0' |
| 1539 | |
| 1540 | # Note: Apple clang self-reports as clang 4.2.0 and gcc 4.2.1. It passes |
| 1541 | # the version check more by accident than anything else but a more rigorous |
no test coverage detected
searching dependent graphs…