summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Dorier <mdorier@anl.gov>2019-09-25 18:41:02 -0500
committerTodd Gamblin <tgamblin@llnl.gov>2019-09-25 16:41:02 -0700
commite6cae978b8018f87d1129cbb7a33f0f27d9c497b (patch)
tree3606c153a58b3d3278517d6114a1ac26d2df1b97
parent4e858e24b0ffccd8962e376f9ffc6cd93ad5c0dd (diff)
downloadspack-e6cae978b8018f87d1129cbb7a33f0f27d9c497b.tar.gz
spack-e6cae978b8018f87d1129cbb7a33f0f27d9c497b.tar.bz2
spack-e6cae978b8018f87d1129cbb7a33f0f27d9c497b.tar.xz
spack-e6cae978b8018f87d1129cbb7a33f0f27d9c497b.zip
llvm, mesa: update target comparison semantics (#12914)
* llvm: fixed issues with syntax and formatting * use spec.architecture.target.family * use spec.target instead of spec.architecture.target * mesa: use == instead of __contains__
-rw-r--r--var/spack/repos/builtin/packages/llvm/package.py15
-rw-r--r--var/spack/repos/builtin/packages/mesa/package.py2
2 files changed, 10 insertions, 7 deletions
diff --git a/var/spack/repos/builtin/packages/llvm/package.py b/var/spack/repos/builtin/packages/llvm/package.py
index 407898d5f0..5946d6c784 100644
--- a/var/spack/repos/builtin/packages/llvm/package.py
+++ b/var/spack/repos/builtin/packages/llvm/package.py
@@ -683,16 +683,19 @@ class Llvm(CMakePackage):
# hence the test to see if the version starts with "flang".
targets.append('CppBackend')
- 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(
diff --git a/var/spack/repos/builtin/packages/mesa/package.py b/var/spack/repos/builtin/packages/mesa/package.py
index dba6c5d982..918ae841d0 100644
--- a/var/spack/repos/builtin/packages/mesa/package.py
+++ b/var/spack/repos/builtin/packages/mesa/package.py
@@ -101,7 +101,7 @@ class Mesa(AutotoolsPackage):
args_gallium_drivers = ['swrast']
args_dri_drivers = []
- if 'arm' in spec.architecture.target.lower():
+ if spec.target.family == 'arm':
args.append('--disable-libunwind')
num_frontends = 0