Conditions | 3 |
Total Lines | 10 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | #!python |
||
12 | def main(): |
||
13 | res = run(['gcc', '-v'], check=True, text=True, |
||
14 | stdout=PIPE, stderr=PIPE) |
||
15 | target = re.search(r'^Target: (.*)$', res.stderr, flags=re.M).groups()[0] |
||
16 | if target.startswith('i686'): |
||
17 | print('32') |
||
18 | elif target.startswith('x86_64'): |
||
19 | print('64') |
||
20 | else: |
||
21 | raise RuntimeError('Could not detect Mingw-w64 bitness') |
||
22 | |||
26 |