[PATCH] D103184: [AArch64] handle -Wa,-march=

David Spickett via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 1 01:57:42 PDT 2021


DavidSpickett added a comment.

Thanks for taking this up! I never got the time for it.

I'd like to see the test check that there are no unused argument warnings when there are multiple values. I missed that with another patch in this area.

Beyond that I'm not sure the logic is right here. You've got `-Wa,-march` being additive, in contrast to the compiler option which only uses the last value:

  $ ./bin/clang --target=aarch64-arm-none-eabi -march=armv8.1-a -march=armv8.2-a /tmp/test.c -###
  <...> "-target-cpu" "generic" "-target-feature" "+neon" "-target-feature" "+v8.2a" <...>

Maybe you're working to make some specific build system work but from the clang side we'd want consistent behaviour for Arm and AArch64 options.

Let me restate the Arm behaviour, minus the `mcpu` stuff that was also in that patch:

- Only compiler options apply to non assembly files
- Compiler and assembler options apply to assembly files
- For assembly files, if you have both kinds of option, you prefer the assembler option(s)
- Of the options that apply (or are preferred), the last value wins (it's not additive)

Do you disagree with that set of rules?

I wouldn't think that AArch64 would have that different needs, but then again I'm not trying to build existing projects, just make the clang side logical.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103184



More information about the cfe-commits mailing list