Return a list of supported extra checks after testing them against the compiler. Parameters ---------- names : str CPU feature name in uppercase.
(self, name)
| 1622 | |
| 1623 | @_Cache.me |
| 1624 | def feature_extra_checks(self, name): |
| 1625 | """ |
| 1626 | Return a list of supported extra checks after testing them against |
| 1627 | the compiler. |
| 1628 | |
| 1629 | Parameters |
| 1630 | ---------- |
| 1631 | names : str |
| 1632 | CPU feature name in uppercase. |
| 1633 | """ |
| 1634 | assert isinstance(name, str) |
| 1635 | d = self.feature_supported[name] |
| 1636 | extra_checks = d.get("extra_checks", []) |
| 1637 | if not extra_checks: |
| 1638 | return [] |
| 1639 | |
| 1640 | self.dist_log("Testing extra checks for feature '%s'" % name, extra_checks) |
| 1641 | flags = self.feature_flags(name) |
| 1642 | available = [] |
| 1643 | not_available = [] |
| 1644 | for chk in extra_checks: |
| 1645 | test_path = os.path.join( |
| 1646 | self.conf_check_path, "extra_%s.c" % chk.lower() |
| 1647 | ) |
| 1648 | if not os.path.exists(test_path): |
| 1649 | self.dist_fatal("extra check file does not exist", test_path) |
| 1650 | |
| 1651 | is_supported = self.dist_test(test_path, flags + self.cc_flags["werror"]) |
| 1652 | if is_supported: |
| 1653 | available.append(chk) |
| 1654 | else: |
| 1655 | not_available.append(chk) |
| 1656 | |
| 1657 | if not_available: |
| 1658 | self.dist_log("testing failed for checks", not_available, stderr=True) |
| 1659 | return available |
| 1660 | |
| 1661 | |
| 1662 | def feature_c_preprocessor(self, feature_name, tabs=0): |
no test coverage detected