'Called by the parser to add a known flag.
Known flags currently include "arch"'

def _add_flag(self, name, value):

    valid_flags = FlagMap.valid_compiler_flags()
    if ((name == 'arch') or (name == 'architecture')):
        parts = tuple(value.split('-'))
        (plat, os, tgt) = (parts if (len(parts) == 3) else (None, None, value))
        self._set_architecture(platform=plat, platform_os=os, target=tgt)
    elif (name == 'platform'):
        self._set_architecture(platform=value)
    elif ((name == 'os') or (name == 'operating_system')):
        self._set_architecture(platform_os=value)
    elif (name == 'target'):
        self._set_architecture(target=value)
    elif (name in valid_flags):
        assert (self.compiler_flags is not None)
        self.compiler_flags[name] = value.split()
    elif ((str(value).upper() == 'TRUE') or (str(value).upper() == 'FALSE')):
        self.variants[name] = BoolValuedVariant(name, value)
    else:
        self.variants[name] = AbstractVariant(name, value)
