Changed architecture parser so that if user just enters in frontend or backend, then both the os and target will take those names. In the concretize method the frontend target/os and backend target/os will be picked to match each other

This commit is contained in:
Mario Melara 2016-04-07 14:38:04 -07:00
parent 07df403203
commit 0ad317213c

View file

@ -462,11 +462,10 @@ def _set_architecture(self, architecture):
"""Called by the parser to set the architecture.""" """Called by the parser to set the architecture."""
if self.architecture: raise DuplicateArchitectureError( if self.architecture: raise DuplicateArchitectureError(
"Spec for '%s' cannot have two architectures." % self.name) "Spec for '%s' cannot have two architectures." % self.name)
platform = spack.architecture.sys_type()
if '-' in architecture: if '-' in architecture:
os, target = architecture.split('-') os, target = architecture.split('-')
else: elif architecture == 'frontend' or architecture == 'backend':
os = None os = architecture
target = architecture target = architecture
self.architecture = spack.architecture.Arch(os, target) self.architecture = spack.architecture.Arch(os, target)