[PATCH] [ARM] Produce an error message if -arm-no-strict-align is specified with the v6M arch.

Renato Golin renato.golin at linaro.org
Thu Oct 23 07:11:53 PDT 2014


On 23 October 2014 15:01, Charlie Turner <charlie.turner at arm.com> wrote:
> I should have given more context for this patch. I recently committed a change to Clang that issues a diagnostic if you give a set of arguments such as
>
> clang -c -target thumbv6m-none-linux-eabi -mcpu=cortex-m0 -munaligned-access empty.c
>
> to the clang driver  but overlooked that llc also ignored the equivalent set of inconsistent options. So yes, the error would get caught by clang in this case by a user, but when using llc directly or as you say from another front-end, I think and error should be reported.

Ahn, yes. :)


> $ llc -mtriple=arm-none-eabi -mcpu=cortex-m0 empty.ll
> LLVM ERROR: CPU: 'cortex-m0' does not support ARM mode execution!

I know, that's the only other case. :)


> That error is given from the ARMTargetMachine::ARMTargetMachine constructor in lib/Target/ARM/ARMTargetMachine.cpp. Having discussed this with some other people, I'm getting the impression that such error checking for inconsistent options when using llc is unnecessary. If you agree then I'm happy to retract this patch.

It is, that's why I asked. No worries.

cheers,
--renato




More information about the llvm-commits mailing list