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

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

  let os = components[2]

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