I’m a member engineer of linaro’s llvm team,coming from Spreadtrum.I am a new person on LLVM.Now I’m writing a Target Parser for AArch64,so options parsing of AArch64 about cpu & arch & fpu can be summary to one place.
In the TargetParser,we assume “aarch64” and “arm64” are synonyms of armv8a(as they are only for armv8a,people usually do this). So after using AArch64TargetParser in options parsing in Clang,using “-march=aarch64” and “-march=arm64” are both valid.
I saw Kevin has a different view on this in his submission:r213353.
+// RUN: %clang -target aarch64 -march=arm64 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-ARCH-NOT-ACCEPT %s
+// RUN: %clang -target aarch64 -march=aarch64 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-ARCH-NOT-ACCEPT %s
+// CHECK-ARCH-NOT-ACCEPT: error: the clang compiler does not support
So I failed on the regression testing.So I think we should reach a consensus on this issue.
Would you mind letting me know what you think of this issuse?
Thank you very much!Looking forward to your reply!
I enclose the attachments for your reference.
AArch64TargetParser_clang.patch (4.18 KB)
AArch64TargetParser_llvm.patch (31.9 KB)