Expands variables references in ARCHS, and remove duplicates.
(self, archs, sdkroot)
| 62 | return self._archs["mac"] |
| 63 | |
| 64 | def _ExpandArchs(self, archs, sdkroot): |
| 65 | """Expands variables references in ARCHS, and remove duplicates.""" |
| 66 | variable_mapping = self._VariableMapping(sdkroot) |
| 67 | expanded_archs = [] |
| 68 | for arch in archs: |
| 69 | if self.variable_pattern.match(arch): |
| 70 | variable = arch |
| 71 | try: |
| 72 | variable_expansion = variable_mapping[variable] |
| 73 | for arch in variable_expansion: |
| 74 | if arch not in expanded_archs: |
| 75 | expanded_archs.append(arch) |
| 76 | except KeyError: |
| 77 | print('Warning: Ignoring unsupported variable "%s".' % variable) |
| 78 | elif arch not in expanded_archs: |
| 79 | expanded_archs.append(arch) |
| 80 | return expanded_archs |
| 81 | |
| 82 | def ActiveArchs(self, archs, valid_archs, sdkroot): |
| 83 | """Expands variables references in ARCHS, and filter by VALID_ARCHS if it |
no test coverage detected