(self, cpu_baseline, cpu_dispatch)
| 1756 | |
| 1757 | """ |
| 1758 | def __init__(self, cpu_baseline, cpu_dispatch): |
| 1759 | self._parse_policies = dict( |
| 1760 | # POLICY NAME, (HAVE, NOT HAVE, [DEB]) |
| 1761 | KEEP_BASELINE = ( |
| 1762 | None, self._parse_policy_not_keepbase, |
| 1763 | [] |
| 1764 | ), |
| 1765 | KEEP_SORT = ( |
| 1766 | self._parse_policy_keepsort, |
| 1767 | self._parse_policy_not_keepsort, |
| 1768 | [] |
| 1769 | ), |
| 1770 | MAXOPT = ( |
| 1771 | self._parse_policy_maxopt, None, |
| 1772 | [] |
| 1773 | ), |
| 1774 | WERROR = ( |
| 1775 | self._parse_policy_werror, None, |
| 1776 | [] |
| 1777 | ), |
| 1778 | AUTOVEC = ( |
| 1779 | self._parse_policy_autovec, None, |
| 1780 | ["MAXOPT"] |
| 1781 | ) |
| 1782 | ) |
| 1783 | if hasattr(self, "parse_is_cached"): |
| 1784 | return |
| 1785 | |
| 1786 | self.parse_baseline_names = [] |
| 1787 | self.parse_baseline_flags = [] |
| 1788 | self.parse_dispatch_names = [] |
| 1789 | self.parse_target_groups = {} |
| 1790 | |
| 1791 | if self.cc_noopt: |
| 1792 | # skip parsing baseline and dispatch args and keep parsing target groups |
| 1793 | cpu_baseline = cpu_dispatch = None |
| 1794 | |
| 1795 | self.dist_log("check requested baseline") |
| 1796 | if cpu_baseline is not None: |
| 1797 | cpu_baseline = self._parse_arg_features("cpu_baseline", cpu_baseline) |
| 1798 | baseline_names = self.feature_names(cpu_baseline) |
| 1799 | self.parse_baseline_flags = self.feature_flags(baseline_names) |
| 1800 | self.parse_baseline_names = self.feature_sorted( |
| 1801 | self.feature_implies_c(baseline_names) |
| 1802 | ) |
| 1803 | |
| 1804 | self.dist_log("check requested dispatch-able features") |
| 1805 | if cpu_dispatch is not None: |
| 1806 | cpu_dispatch_ = self._parse_arg_features("cpu_dispatch", cpu_dispatch) |
| 1807 | cpu_dispatch = { |
| 1808 | f for f in cpu_dispatch_ |
| 1809 | if f not in self.parse_baseline_names |
| 1810 | } |
| 1811 | conflict_baseline = cpu_dispatch_.difference(cpu_dispatch) |
| 1812 | self.parse_dispatch_names = self.feature_sorted( |
| 1813 | self.feature_names(cpu_dispatch) |
| 1814 | ) |
| 1815 | if len(conflict_baseline) > 0: |
nothing calls this directly
no test coverage detected