Minor tweaks to abi code.
This commit is contained in:
parent
0244d794cd
commit
b0572a5462
1 changed files with 18 additions and 18 deletions
|
@ -89,8 +89,7 @@ def _intel_compiler_compare(self, pversion, cversion):
|
||||||
# Test major and minor versions. Ignore build version.
|
# Test major and minor versions. Ignore build version.
|
||||||
if (len(pversion.version) < 2 or len(cversion.version) < 2):
|
if (len(pversion.version) < 2 or len(cversion.version) < 2):
|
||||||
return False
|
return False
|
||||||
return (pversion.version[0] == cversion.version[0]) and \
|
return pversion.version[:2] == cversion.version[:2]
|
||||||
(pversion.version[1] == cversion.version[1])
|
|
||||||
|
|
||||||
|
|
||||||
def compiler_compatible(self, parent, child, **kwargs):
|
def compiler_compatible(self, parent, child, **kwargs):
|
||||||
|
@ -105,17 +104,19 @@ def compiler_compatible(self, parent, child, **kwargs):
|
||||||
if kwargs.get('loose', False):
|
if kwargs.get('loose', False):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
# TODO: Can we move the specialized ABI matching stuff
|
||||||
|
# TODO: into compiler classes?
|
||||||
for pversion in parent.compiler.versions:
|
for pversion in parent.compiler.versions:
|
||||||
for cversion in child.compiler.versions:
|
for cversion in child.compiler.versions:
|
||||||
# For a few compilers use specialized comparisons. Otherwise
|
# For a few compilers use specialized comparisons. Otherwise
|
||||||
# match on version match.
|
# match on version match.
|
||||||
if pversion.satisfies(cversion):
|
if pversion.satisfies(cversion):
|
||||||
return True
|
return True
|
||||||
elif parent.compiler.name == "gcc" and \
|
elif (parent.compiler.name == "gcc" and
|
||||||
self._gcc_compiler_compare(pversion, cversion):
|
self._gcc_compiler_compare(pversion, cversion)):
|
||||||
return True
|
return True
|
||||||
elif parent.compiler.name == "intel" and \
|
elif (parent.compiler.name == "intel" and
|
||||||
self._intel_compiler_compare(pversion, cversion):
|
self._intel_compiler_compare(pversion, cversion)):
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
@ -125,4 +126,3 @@ def compatible(self, parent, child, **kwargs):
|
||||||
loosematch = kwargs.get('loose', False)
|
loosematch = kwargs.get('loose', False)
|
||||||
return self.architecture_compatible(parent, child) and \
|
return self.architecture_compatible(parent, child) and \
|
||||||
self.compiler_compatible(parent, child, loose=loosematch)
|
self.compiler_compatible(parent, child, loose=loosematch)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue