(arch)
| 22 | } |
| 23 | |
| 24 | function toArchArray(arch) { |
| 25 | if (! Array.isArray(arch)) { |
| 26 | arch = arch ? [arch] : compiler.ALL_ARCHES; |
| 27 | } |
| 28 | |
| 29 | const seen = Object.create(null); |
| 30 | |
| 31 | arch.splice(0).forEach(where => { |
| 32 | if (seen[where]) return; |
| 33 | seen[where] = true; |
| 34 | arch.push(...archinfo.mapWhereToArches(where)); |
| 35 | }); |
| 36 | |
| 37 | // avoid using _.each so as to not add more frames to skip |
| 38 | for (var i = 0; i < arch.length; ++i) { |
| 39 | var inputArch = arch[i]; |
| 40 | var isMatch = _.any(_.map(compiler.ALL_ARCHES, function (actualArch) { |
| 41 | return archinfo.matches(actualArch, inputArch); |
| 42 | })); |
| 43 | if (! isMatch) { |
| 44 | buildmessage.error( |
| 45 | "Invalid 'where' argument: '" + inputArch + "'", |
| 46 | // skip toArchArray in addition to the actual API function |
| 47 | {useMyCaller: 1}); |
| 48 | } |
| 49 | } |
| 50 | return arch; |
| 51 | } |
| 52 | |
| 53 | // Iterates over the list of target archs and calls f(arch) for all archs |
| 54 | // that match an element of self.allarchs. |
no test coverage detected
searching dependent graphs…