Hello, I am trying to build llvm/clang using cmake and visual studio 2008 on windows vista. I want to convert the llvm bitcode file hello.bc into C code. I saw in the documentation that "llc -march=c hello.bc" would convert the bitcode and generate a c code file. but it says llc:error: invalid target "c" could you tell me why is it not working. and what is the way to convert the bitcode file into a c file.? Thanks -- Kalyan Ponnala phone: 8163772059 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100214/7c107abc/attachment.html>
> > > could you tell me why is it not working. and what is the way to convert the > bitcode file into a c file.? > Thanks >Did you compile clang/LLVM with the C backend target enabled? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100214/c53d6bd5/attachment.html>
On Sun, Feb 14, 2010 at 3:52 PM, kalyan ponnala <ponnala.kalyan at gmail.com>wrote:> I used cmake gui to build the clang/llvm solution file. > llc hello.bc -march=x86 -o hello.s > this above command works. But the c backend thing does not work in place of > x86. > The targets that the llc -version gave me are > x86 -32bit > x86 - 64bit > and the target triple is i686-pc-win32 > > now could you tell me if this is right. or else does it have to support any > other targets? > > ThanksYou need to add the C backend target or build all the targets with cmake. -DLLVM_TARGETS_TO_BUILD="X86;CBackend" -DLLVM_TARGETS_TO_BUILD=all -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100214/cad20c3d/attachment.html>