[llvm-dev] Generation of IR for MyTarget

Krzysztof Parzyszek via llvm-dev llvm-dev at lists.llvm.org
Wed Nov 23 07:25:41 PST 2016

There are several different pieces here.  Assuming that you have added 
your target triple to Triple.h/.cpp, and have the LLVM part working, you 
need to create TargetInfo, and the corresponding toolchain. Look in the 
clang repository in
To see how it's done for other targets.


On 11/23/2016 5:56 AM, Varun Patil via llvm-dev wrote:
> Hi Developers,
> I have written C program and want to generate IR file for Specific
> Target I have tried with following command but got a error as follows,
> *clang -S -emit-llvm -march=leg ~/llc-test-examples/ex9.c -o
> ~/llc-test-examples/ex9.ll*
> *error: unknown target CPU 'leg'
> *
> So any please help me what all other step should I do previously to get
> my *leg* target in clang. So that i can use -march=leg option in this
> command.
> Thanks and Regards
> Varun
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev

More information about the llvm-dev mailing list