[InstCombine] Signed saturation patterns
[llvm-complete.git] / test / tools / gold / X86 / v1.12 / lit.local.cfg
blob7f1b6137cc0b83bb696d046a847559c736adcbed
1 import re
2 import subprocess
4 def is_gold_v1_12_linker_available():
6   if not config.gold_executable:
7     return False
8   try:
9     ld_cmd = subprocess.Popen([config.gold_executable, '-v'],
10                               stdout = subprocess.PIPE,
11                               stderr = subprocess.PIPE)
12     ld_out, _ = ld_cmd.communicate()
13     ld_out = ld_out.decode()
14   except:
15     return False
17   match = re.search(r'GNU gold \(.*\) (\d+)\.(\d+)', ld_out)
18   if not match:
19     return False
20   major = int(match.group(1))
21   minor = int(match.group(2))
22   if major < 1 or (major == 1 and minor < 12):
23     return False
25   return True
27 if not is_gold_v1_12_linker_available():
28   config.unsupported = True