Hi Nick,<div><br></div><div>     I need the module.ll file. Now how can i configure LLVM to enable "c" target? Is it that i need to build from the scratch? Is there any way to enable 'c' target also? <br>
<br><div class="gmail_quote">On Tue, Jan 24, 2012 at 12:10 PM, Nick Lewycky <span dir="ltr"><<a href="mailto:nicholas@mxc.ca">nicholas@mxc.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Sarath Chandra wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
Hi,<br>
<br>
     I wanted to convert .ll file to .c file (for the sake of debugging<br>
the c file). I used the command "llc" with "-march=c" option. But i'm<br>
getting the below error.<br>
<br></div>
* llc: error: invalid target 'c' *<br>
*<div class="im"><br>
*<br>
My script file code for converting it is:<br>
<br>
llvm-as -f module.ll<br>
opt -o=module.bc module.bc<br>
llvm-dis module.bc<br>
</div></blockquote>
<br>
You don't need the llvm-dis step (unless you want the module.ll file for some other reason).<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
llc -f -march=c module.bc<br>
#gcc  module.cbe.c -lstdc++<br>
<br>
What i need to do to get the 'c' file generated. I build LLVM using<br></div>
'*enable-targets = x86*' . Can i use '*enable-targets = x86,c*' to clear<br>
the error?<br>
</blockquote>
<br>
I think you're looking for configure --enable-targets=x86,cbe .<span class="HOEnZb"><font color="#888888"><br>
<br>
Nick<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>Sairam,<br><br>  (¨`·.·´¨) <br>   `·.¸(¨`·.·´¨) <br>  (¨`·.·´¨)¸.·´ Sarath!!!<br>    `·.¸.·´<br>
</div>