[clang] [Darwin] Add reverse mappings for aarch64/aarch64_32 to darwin arch names
authorMartin Storsjö <martin@martin.st>
Wed, 29 Apr 2020 19:19:48 +0000 (22:19 +0300)
committerMartin Storsjö <martin@martin.st>
Fri, 29 May 2020 12:23:14 +0000 (15:23 +0300)
commitac1f7ab007e347dc4a542aa3415e6378289480f4
tree5bb293d39665494e6f4751067c90675e3b02f193
parentd20a3d35e1875d7a4928184117e6a875c35f3f63
[clang] [Darwin] Add reverse mappings for aarch64/aarch64_32 to darwin arch names

These are mapped in MachO::getMachOArchName already, but were missing
in ToolChain::getDefaultUniversalArchName.

Having these reverse mapped here fixes weird inconsistencies like
-dumpmachine showing a target triple like "aarch64-apple-darwin",
while "clang -target aarch64-apple-darwin" didn't use to work (ended
up mapped as unknown-apple-ios).

Differential Revision: https://reviews.llvm.org/D79117
clang/lib/Driver/ToolChain.cpp
clang/test/Driver/darwin-arm64-target.c [new file with mode: 0644]