brintos

brintos / llvm-project-archived public Read only

0
0
Text · 460 B · b0b9f3e Raw
23 lines · plain
1import os2import subprocess3 4 5def have_needed_diff_support():6    if not os.path.exists("/usr/bin/diff"):7        return False8 9    ld_cmd = subprocess.Popen(10        ["/usr/bin/diff", "--help"],11        stdout=subprocess.PIPE,12        stderr=subprocess.STDOUT,13        env={"LANG": "C"},14    )15    ld_out = ld_cmd.stdout.read().decode()16    ld_cmd.wait()17 18    return "-line-format" in ld_out19 20 21if not have_needed_diff_support():22    config.unsupported = True23