diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index fe06c36bb..9e010d742 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -1119,6 +1119,20 @@ class MachineInfo: self.cpu = cpu self.endian = endian + def __eq__(self, other): + if self.__class__ is not other.__class__: + return NotImplemented + return \ + self.system == other.system and \ + self.cpu_family == other.cpu_family and \ + self.cpu == other.cpu and \ + self.endian == other.endian + + def __ne__(self, other): + if self.__class__ is not other.__class__: + return NotImplemented + return not self.__eq__(other) + @staticmethod def detect(compilers = None): """Detect the machine we're running on