[PATCH] D43005: [ARM] Error out on .arm assembler directives on windows

Peter Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 27 09:30:26 PST 2018


peter.smith added a comment.

> To clarify further - if I invoke the assembler as in the testcase I'm adding here, `llvm-mc -triple=thumbv7-win32 < %s ` (or `clang -target armv7-win32 -c file.S`, which internally remaps it to `thumbv7-win32` before it hits llvm), without manually setting the flag, what class/file should set it?

Thanks for the response, that makes things a bit clearer. Off the top of my head the place I'd start would be arm::getARMTargetFeatures() in Driver/Toolchains/Arch.cpp As I understand it this builds up the target feature string based on the clang command line arguments, this does have access to the triple so it should be possible to add "+noarm" to the feature string if the OS is windows after the CPU defaults have been added. It looks like that should be called prior to the integrated assembler being launched. I've not looked into llvm-mc, although I suspect it will have a similar place where the feature string is built up.

I've not tested any of the above, it is just where I'd start. I may be able to get some more time later in the week to look at this more thoroughly.


Repository:
  rL LLVM

https://reviews.llvm.org/D43005





More information about the llvm-commits mailing list