[PATCH] D95872: [clang][Arm] Fix handling of -Wa,-march=

David Spickett via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 3 02:29:42 PST 2021


DavidSpickett marked 6 inline comments as done.
DavidSpickett added inline comments.


================
Comment at: clang/test/Driver/arm-target-as-march-mcpu.s:42
+/// We use the target CPU for both.
+// RUN: %clang -target arm-linux-gnueabi -### -c -mcpu=cortex-a8 -Wa,-march=armv8a %s 2>&1 | \
+// RUN: FileCheck -check-prefix=TRIPLE-ARMV8 --check-prefix=CPU-A8 %s
----------------
nickdesaulniers wrote:
> nickdesaulniers wrote:
> > Below you have a comment `(cortex-a32 is armv8a)`.  That is very helpful for me.  I assume `cortex-a8` is armv7a?
> And if so, would you mind adding a similar comment here?
Exactly, I've added a comment up top to explain the logic in one place.


================
Comment at: clang/test/Driver/arm-target-as-march-mcpu.s:82
+/// Last mcpu to compiler wins
+// RUN: %clang -target arm-linux-gnueabi -### -c -mcpu=cortex-a32 -mcpu=cortex-a8 %s 2>&1 | \
+// RUN: FileCheck -check-prefix=TRIPLE-ARMV7 -check-prefix=CPU-A8 %s
----------------
nickdesaulniers wrote:
> add a `-mcpu=foo,bar` test for `-mcpu`? (Comma separated)
mcpu and march don't let you use multiple values:
```
error: the clang compiler does not support '-march=armv8-a,armv7-a'
error: unsupported argument 'armv7-a' to option 'Wa,
```
(the latter it thinks that its another arg like `-Wa,armv7-a`)

Pretty sure that's tested elsewhere or if it isn't, this isn't the place for it at least.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95872/new/

https://reviews.llvm.org/D95872



More information about the cfe-commits mailing list