[LLVMdev] "-march" trashing ARM triple
David Meyer
pdox at google.com
Fri Mar 2 00:04:51 PST 2012
ARM subtarget features are determined by parsing the target tuple string
TT. (ParseARMTriple(StringRef TT) in ARMMCTargetDesc.cpp)
In llc, the -march setting overrides the architecture specified in
-mtriple. So when you invoke:
$ llc -march arm -mtriple armv7-none-linux ...
ParseARMTriple() will see TT == "arm-none-linux" instead of
"armv7-none-linux". As a result, the target features will be set
generically. (Note that using "-march armv7" is not valid.)
This is clearly wrong, but I'm not clear on where/how this should be fixed.
Does the -march substitution need to happen at all? Could it be disabled
only for ARM? Should TargetTriple or -march be made more precise?
Thanks,
- pdox
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120302/ca064760/attachment.html>
More information about the llvm-dev
mailing list