Update target comparison semantic for a few packages (#12947)

Use spec.target.family instead of spec.architecture.target
This commit is contained in:
Massimiliano Culpo 2019-09-26 10:25:12 +02:00 committed by GitHub
parent 31e5318c24
commit 90236bc9f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 14 additions and 14 deletions

View file

@ -105,7 +105,7 @@ def configure_args(self):
'--without-boost',
]
if 'aarch64' not in spec.architecture.target.lower():
if spec.target.family != 'aarch64':
config_args.append('--with-64')
if '+static' in spec:
config_args.append('--with-static')

View file

@ -225,8 +225,7 @@ def nvariant_bool(feature):
else:
cmake_args.append('-DPARAVIEW_ENABLE_PYTHON:BOOL=OFF')
arch = spec.architecture
if(arch.platform == 'linux' and arch.target == 'aarch64'):
if spec.platform == 'linux' and spec.target == 'aarch64':
cmake_args.append('-DCMAKE_CXX_FLAGS=-DPNG_ARM_NEON_OPT=0')
cmake_args.append('-DCMAKE_C_FLAGS=-DPNG_ARM_NEON_OPT=0')

View file

@ -90,7 +90,6 @@ class Hpctoolkit(AutotoolsPackage):
def configure_args(self):
spec = self.spec
target = spec.architecture.target
args = [
'--with-binutils=%s' % spec['binutils'].prefix,
@ -117,7 +116,7 @@ def configure_args(self):
if spec.satisfies('@gpu'):
args.append('--with-mbedtls=%s' % spec['mbedtls'].prefix)
if target == 'x86_64':
if spec.target.family == 'x86_64':
args.append('--with-xed=%s' % spec['intel-xed'].prefix)
if '+papi' in spec:

View file

@ -788,8 +788,8 @@ def __init__(self, spec, **kwargs):
# spec.architecture.platform is like `uname -s`, but lower-case
platform = spec.architecture.platform
# spec.architecture.target is like `uname -m`
target = spec.architecture.target
# spec.target.family is like `uname -m`
target = spec.target.family
if platform == 'linux':
if target == 'x86_64':

View file

@ -26,7 +26,7 @@ def cmake_args(self):
args = []
args.append("-DBUILD_SHARED_LIBS=ON")
args.append("-DARCH=%s" % self.spec.architecture.target)
args.append("-DARCH=%s" % self.spec.target)
args.append("-DCMAKE_C_COMPILER=%s" % self.spec['mpi'].mpicc)
args.append("-DCMAKE_CXX_COMPILER=%s" % self.spec['mpi'].mpicxx)

View file

@ -135,16 +135,18 @@ def cmake_args(self):
targets = ['NVPTX', 'AMDGPU']
if 'x86' in spec.architecture.target.lower():
if spec.target.family == 'x86' or spec.target.family == 'x86_64':
targets.append('X86')
elif 'arm' in spec.architecture.target.lower():
elif spec.target.family == 'arm':
targets.append('ARM')
elif 'aarch64' in spec.architecture.target.lower():
elif spec.target.family == 'aarch64':
targets.append('AArch64')
elif 'sparc' in spec.architecture.target.lower():
elif spec.target.family == 'sparc' or spec.target.family == 'sparc64':
targets.append('Sparc')
elif ('ppc' in spec.architecture.target.lower() or
'power' in spec.architecture.target.lower()):
elif (spec.target.family == 'ppc64' or
spec.target.family == 'ppc64le' or
spec.target.family == 'ppc' or
spec.target.family == 'ppcle'):
targets.append('PowerPC')
cmake_args.append(