envconfig: Store whether the cpu_familiy is 64 bit

We'll need this in the llvm-config logic to determine the right
llvm-config to call on Fedora 30+, but this feels like the sort of
information that might be useful elsewhere. This does not expose this
information as part of the public API, it's only accessible at the
python layer.
pull/5092/head
Dylan Baker 6 years ago committed by Jussi Pakkanen
parent bcee8fb8ca
commit 914056f68a
  1. 13
      mesonbuild/envconfig.py

@ -55,6 +55,18 @@ known_cpu_families = (
'x86_64'
)
# It would feel more natural to call this "64_BIT_CPU_FAMILES", but
# python identifiers cannot start with numbers
CPU_FAMILES_64_BIT = [
'aarch64',
'ia64',
'mips64',
'ppc64',
'riscv64',
'sparc64',
'x86_64',
]
class MesonConfigFile:
@classmethod
def parse_datafile(cls, filename):
@ -150,6 +162,7 @@ class MachineInfo:
self.cpu_family = cpu_family
self.cpu = cpu
self.endian = endian
self.is_64_bit = cpu_family in CPU_FAMILES_64_BIT
def __eq__(self, other):
if self.__class__ is not other.__class__:

Loading…
Cancel
Save