File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -1280,10 +1280,16 @@ def try_check_compiler(cc, lang):
12801280 b'__clang_major__ __clang_minor__ __clang_patchlevel__ '
12811281 b'__APPLE__' )
12821282
1283+ cc_out = proc .communicate ()
1284+ cc_stdout = to_utf8 (cc_out [0 ])
12831285 if sys .platform == 'zos' :
1284- values = (to_utf8 ( proc . communicate ()[ 0 ]) .split ('\n ' )[- 2 ].split () + ['0' ] * 7 )[0 :8 ]
1286+ values = (cc_stdout .split ('\n ' )[- 2 ].split () + ['0' ] * 7 )[0 :8 ]
12851287 else :
1286- values = (to_utf8 (proc .communicate ()[0 ]).split () + ['0' ] * 7 )[0 :8 ]
1288+ values = (cc_stdout .split () + ['0' ] * 7 )[0 :8 ]
1289+
1290+ if len (values ) < 8 :
1291+ cc_stderr = to_utf8 (cc_out [1 ]) if cc_out [1 ] else ''
1292+ raise Exception (f'Could not determine compiler version info. \n stdout:\n { cc_stdout } \n stderr:\n { cc_stderr } ' )
12871293
12881294 is_clang = values [0 ] == '1'
12891295 gcc_version = tuple (map (int , values [1 :1 + 3 ]))
You can’t perform that action at this time.
0 commit comments