'The target of the architecture spec will update the platform field
if the target is set to one of the reserved target types so that
the default target type can be resolved.  Since the reserved target
information is only available for the host machine, the platform
will assumed to be the host machine\'s platform.'

@target.setter
def target(self, value):

    value = (str(value) if (value is not None) else None)
    if (value in spack.architecture.Platform.reserved_targets):
        curr_platform = str(spack.architecture.platform())
        self.platform = (self.platform or curr_platform)
        if (self.platform != curr_platform):
            raise ValueError(("Can't    set    arch    spec    target    to    reserved    value    '%s'    when    the    arch    platform    (%s)    isn't    the    current    platform    (%s)" % (value, self.platform, curr_platform)))
        spec_platform = spack.architecture.get_platform(self.platform)
        value = str(spec_platform.target(value))
    self._target = value
