MCPcopy Index your code
hub / github.com/nodejs/node / _ExpandArchs

Method _ExpandArchs

tools/gyp/pylib/gyp/xcode_emulation.py:64–80  ·  view source on GitHub ↗

Expands variables references in ARCHS, and remove duplicates.

(self, archs, sdkroot)

Source from the content-addressed store, hash-verified

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

Callers 1

ActiveArchsMethod · 0.95

Calls 4

_VariableMappingMethod · 0.95
matchMethod · 0.65
printFunction · 0.50
appendMethod · 0.45

Tested by

no test coverage detected