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

Function cc_macros

configure.py:1645–1671  ·  view source on GitHub ↗

Checks predefined macros using the C compiler command.

(cc=None)

Source from the content-addressed store, hash-verified

1643
1644
1645def cc_macros(cc=None):
1646 """Checks predefined macros using the C compiler command."""
1647
1648 try:
1649 p = subprocess.Popen(shlex.split(cc or CC) + ['-dM', '-E', '-'],
1650 stdin=subprocess.PIPE,
1651 stdout=subprocess.PIPE,
1652 stderr=subprocess.PIPE)
1653 except OSError:
1654 error('''No acceptable C compiler found!
1655
1656 Please make sure you have a C compiler installed on your system and/or
1657 consider adjusting the CC environment variable if you installed
1658 it in a non-standard prefix.''')
1659
1660 with p:
1661 p.stdin.write(b'\n')
1662 out = to_utf8(p.communicate()[0]).split('\n')
1663
1664 k = {}
1665 for line in out:
1666 lst = shlex.split(line)
1667 if len(lst) > 2:
1668 key = lst[1]
1669 val = lst[2]
1670 k[key] = val
1671 return k
1672
1673
1674def is_arch_armv7():

Callers 3

is_arch_armv7Function · 0.85
is_arm_hard_float_abiFunction · 0.85
host_arch_ccFunction · 0.85

Calls 4

to_utf8Function · 0.85
errorFunction · 0.70
splitMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…