def _supported_targets(self, compiler_name, compiler_version, targets):
    'Get a list of which targets are supported by the compiler.\n\n        Results are ordered most to least recent.\n        '
    supported = []
    for target in targets:
        try:
            with warnings.catch_warnings():
                warnings.simplefilter('ignore')
                target.optimization_flags(compiler_name, compiler_version)
            supported.append(target)
        except archspec.cpu.UnsupportedMicroarchitecture:
            continue
        except ValueError:
            continue
    return sorted(supported, reverse=True)
Get a list of which targets are supported by the compiler.

Results are ordered most to least recent.
def _supported_targets(self, compiler_name, compiler_version, targets):
    'Get a list of which targets are supported by the compiler.\n\n        Results are ordered most to least recent.\n        '
    supported = []
    for target in targets:
        try:
            with warnings.catch_warnings():
                warnings.simplefilter('ignore')
                target.optimization_flags(compiler_name, compiler_version)
            supported.append(target)
        except archspec.cpu.UnsupportedMicroarchitecture:
            continue
        except ValueError:
            continue
    return sorted(supported, reverse=True)