You need to add your target to autoconf/<a href="http://configure.ac">configure.ac</a>. Here are the directions from <a href="http://llvm.org/docs/WritingAnLLVMBackend.html">http://llvm.org/docs/WritingAnLLVMBackend.html</a><br>
<br>To get LLVM to actually build and link your target, you need to add it to
the <tt>TARGETS_TO_BUILD</tt> variable. To do this, you modify the configure
script to know about your target when parsing the <tt>--enable-targets</tt>
option. Search the configure script for <tt>TARGETS_TO_BUILD</tt>, add your
target to the lists there (some creativity required), and then
reconfigure. Alternatively, you can change <tt>autotools/<a href="http://configure.ac">configure.ac</a></tt> and
regenerate configure by running <tt>./autoconf/AutoRegen.sh</tt>.
<br><br><div class="gmail_quote">On Wed, Sep 19, 2012 at 11:20 PM, Vikram Singh <span dir="ltr"><<a href="mailto:vsp1729@gmail.com" target="_blank">vsp1729@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I am trying to build cross compiler for custom processor (say XYZ) but<div>on compilation it is giving error </div><div><br></div><div>llvm-build: error: invalid native target: XYZ (not in project)</div><div><br></div><div>

I have tried configuring like these</div><div><br></div><div>1. ./configure --target=XYZ</div><div>2. ./configure --target=XYZ --enable-targets=XYZ</div><div>3. ./configure --enable-targets=XYZ</div><div><br></div><div>But every time it is not recognising the XYZ processor.</div>

<div>What could be the problem?</div><div><br></div><div>Thanks & Regards</div><div>VSP</div>
<br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>~Craig<br>