c_config.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:SoCFoundationFlow 作者: mattaw 项目源码 文件源码
def get_xlc_version(conf, cc):
    """Get the compiler version"""

    cmd = cc + ['-qversion']
    try:
        out, err = conf.cmd_and_log(cmd, output=0)
    except Errors.WafError:
        conf.fatal('Could not find xlc %r' % cmd)

    # the intention is to catch the 8.0 in "IBM XL C/C++ Enterprise Edition V8.0 for AIX..."
    for v in (r"IBM XL C/C\+\+.* V(?P<major>\d*)\.(?P<minor>\d*)",):
        version_re = re.compile(v, re.I).search
        match = version_re(out or err)
        if match:
            k = match.groupdict()
            conf.env['CC_VERSION'] = (k['major'], k['minor'])
            break
    else:
        conf.fatal('Could not determine the XLC version.')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号