Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e7173a0

Browse filesBrowse files
legendecasaduh95
authored andcommitted
build: show cc outputs when version detection failed
PR-URL: #61700 Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Richard Lau <richard.lau@ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent a9f90be commit e7173a0
Copy full SHA for e7173a0

1 file changed

+8-2Lines changed: 8 additions & 2 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎configure.py‎

Copy file name to clipboardExpand all lines: configure.py
+8-2Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff 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. \nstdout:\n{cc_stdout}\nstderr:\n{cc_stderr}')
12871293

12881294
is_clang = values[0] == '1'
12891295
gcc_version = tuple(map(int, values[1:1+3]))

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.