MCPcopy Index your code
hub / github.com/nodejs/node / get_gas_version

Function get_gas_version

configure.py:1404–1429  ·  view source on GitHub ↗
(cc)

Source from the content-addressed store, hash-verified

1402 cc, r"(^Apple (?:clang|LLVM) version) ([0-9]+\.[0-9]+)")
1403
1404def get_gas_version(cc):
1405 try:
1406 custom_env = os.environ.copy()
1407 custom_env["LC_ALL"] = "C"
1408 proc = subprocess.Popen(shlex.split(cc) + ['-Wa,-v', '-c', '-o',
1409 '/dev/null', '-x',
1410 'assembler', '/dev/null'],
1411 stdin=subprocess.PIPE, stderr=subprocess.PIPE,
1412 stdout=subprocess.PIPE, env=custom_env)
1413 except OSError:
1414 error('''No acceptable C compiler found!
1415
1416 Please make sure you have a C compiler installed on your system and/or
1417 consider adjusting the CC environment variable if you installed
1418 it in a non-standard prefix.''')
1419
1420 with proc:
1421 gas_ret = to_utf8(proc.communicate()[1])
1422
1423 match = re.match(r"GNU assembler version ([2-9]\.[0-9]+)", gas_ret)
1424
1425 if match:
1426 return match.group(1)
1427
1428 warn(f'Could not recognize `gas`: {gas_ret}')
1429 return '0.0'
1430
1431def get_openssl_version(o):
1432 """Parse OpenSSL version from opensslv.h header file.

Callers 1

check_compilerFunction · 0.85

Calls 6

to_utf8Function · 0.85
errorFunction · 0.70
warnFunction · 0.70
copyMethod · 0.65
matchMethod · 0.65
splitMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…