It is a regression from r249391. The following test failures are found if the build is configured as 'cmake -DLLVM_TARGETS_TO_BUILD="PowerPC" ...'.
Clang-Unit :: Tooling/Release/ToolingTests/addTargetAndModeForProgramName.AddsTargetAndMode
Clang-Unit :: Tooling/Release/ToolingTests/addTargetAndModeForProgramName.IgnoresExistingMode
Clang-Unit :: Tooling/Release/ToolingTests/addTargetAndModeForProgramName.IgnoresExistingTarget
Clang-Unit :: Tooling/Release/ToolingTests/addTargetAndModeForProgramName.PathIgnored
The problem is due to a mismatch between the entries in the target registry and what arch name parseArch() can recognize. For example, with -DLLVM_TARGETS_TO_BUILD="PowerPC", the target registry will have ppc32, ppc64 and ppc64le. When one of those is used in parseArch() to construct part of the triple, an unknown is returned. Similar problem occurs with builds only targeting systemz.