[cfe-dev] Generating IR for a specific arch

João Matos ripzonetriton at gmail.com
Mon Dec 3 16:22:00 PST 2012


I use the -target flag to do this.

On Mon, Dec 3, 2012 at 9:22 PM, Sixstringartist <sixstringartist at aol.com>wrote:

> Could someone please clarify the proper way to target a particular arch
> with Clang -emit-llvm?
>
> In the past, I used the following
>
> ./clang -emit-llvm -march=armv5te ./input.c
>
> This had to be changed due to armv5te selecting a cpu (arm1026ejs) which
> did not have a matching entry in getLLVMArchSuffixForARM. To fix this I
> started using -mcpu=arm1020e
>
> Both mcpu=arm1020e and march=armv5te result in warnings of unused
> arguments and attempt to link using LLVMgold.so rather than produce a
> bitcode file
>
> What is the proper workflow here? Should I be using -target? My goal is to
> create a bitcode file with the target triple of armv5te-none-linux-gnueabi.
>
> Is the above behavior expected (i.e. should I not expect march and mcpu to
> control my target when generating bitcode)?
>
> Thanks
>
> ______________________________**_________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/**mailman/listinfo/cfe-dev<http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev>
>



-- 
João Matos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20121204/b6dc53b4/attachment.html>


More information about the cfe-dev mailing list