     arch = .spir
   case "spir64":
     arch = .spir64
-  case _ where archName.starts(with: "kalimba"):
+  case _ where archName.hasPrefix("kalimba"):
     arch = .kalimba
   case "lanai":
     arch = .lanai

  let os = components[2]

  switch os {
  case _ where os.starts(with: "ananas"):
    return .ananas
  case _ where os.starts(with: "cloudabi"):
    return .cloudABI
  case _ where os.starts(with: "darwin"):
    return .darwin
  case _ where os.starts(with: "dragonfly"):
    return .dragonFly
  case _ where os.starts(with: "freebsd"):
    return .freeBSD
  case _ where os.starts(with: "fuchsia"):
    return .fuchsia
  case _ where os.starts(with: "ios"):
    return .ios
  case _ where os.starts(with: "kfreebsd"):
    return .kfreebsd
  case _ where os.starts(with: "linux"):
    return .linux
  case _ where os.starts(with: "lv2"):
    return .lv2
  case _ where os.starts(with: "macos"):
    return .macosx
  case _ where os.starts(with: "netbsd"):
    return .netbsd
  case _ where os.starts(with: "openbsd"):
    return .openbsd
  case _ where os.starts(with: "solaris"):
    return .solaris
  case _ where os.starts(with: "win32"):
    return .win32
  case _ where os.starts(with: "windows"):
    return .win32
  case _ where os.starts(with: "haiku"):
    return .haiku
  case _ where os.starts(with: "minix"):
    return .minix
  case _ where os.starts(with: "rtems"):
    return .rtems
  case _ where os.starts(with: "nacl"):
    return .nacl
  case _ where os.starts(with: "cnk"):
    return .cnk
  case _ where os.starts(with: "aix"):
    return .aix
  case _ where os.starts(with: "cuda"):
    return .cuda
  case _ where os.starts(with: "nvcl"):
    return .nvcl
  case _ where os.starts(with: "amdhsa"):
    return .amdhsa
  case _ where os.starts(with: "ps4"):
    return .ps4
  case _ where os.starts(with: "elfiamcu"):
    return .elfiamcu
  case _ where os.starts(with: "tvos"):
    return .tvos
  case _ where os.starts(with: "watchos"):
    return .watchos
  case _ where os.starts(with: "mesa3d"):
    return .mesa3d
  case _ where os.starts(with: "contiki"):
    return .contiki
  case _ where os.starts(with: "amdpal"):
    return .amdpal
  case _ where os.starts(with: "hermit"):
    return .hermitcore
  case _ where os.starts(with: "hurd"):
    return .hurd
  case _ where os.starts(with: "wasi"):
    return .wasi
  case _ where os.starts(with: "emscripten"):
    return .emscripten
  default:
    return .unknown

  // Some architectures require special parsing logic just to compute the
  // ArchType result.
  if arch == .unknown {
    if archName.hasPrefix("arm") || archName.hasPrefix("thumb") || archName.hasPrefix("aarch64") {
      arch = parseARMArch(archName)
    }

    if archName.hasPrefix("bpf") {
      arch = parseBPFArch(archName)
    }
  }
