2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-11-17 23:46:53 +01:00

Issue 1372 version detection for old and buggy sun compilers

This commit is contained in:
Thomas Nagy 2013-11-08 22:45:11 +01:00
parent ca4c933a28
commit ec7c651394

View File

@ -1148,7 +1148,11 @@ def get_suncc_version(conf, cc):
try: try:
out, err = conf.cmd_and_log(cmd, output=0) out, err = conf.cmd_and_log(cmd, output=0)
except Errors.WafError: except Errors.WafError:
conf.fatal('Could not find suncc %r' % cmd) # Older versions of the compiler exit with non-zero status when reporting their version
if not (hasattr(e, 'returncode') and hasattr(e, 'stdout') and hasattr(e, 'stderr')):
conf.fatal('Could not find suncc %r' % cmd)
out = e.stdout
err = e.stderr
version = (out or err) version = (out or err)
version = version.split('\n')[0] version = version.split('\n')[0]