Von: LLVM Developers Mailing List <email@example.com>
Gesendet: 12.06.07 19:24:12
An: LLVM Developers Mailing List <firstname.lastname@example.org>
Betreff: Re: [LLVMdev] LLVM binaries for Windows and more
> I want to use LLVM for my own "pet" programming language compiler as a backend.
> Currently it generates C code, but I am not satisfied with this approach as generating
> high-level C (with proper type declarations!) is horrible.
> So here are my questions/problems with LLVM:
> 1.) Are there operations that add, sub, mul integers with overflow
> checking? How much work would it be to add those? They are needed
> for my programming language, but I think Pascal and Ada need those
No not yet, the recommended solution is to compute overflow manually with
arithmetic after you do the operations you need. In time LLVM will be
extended to support this capability.
Ok, but I fear the optimizer is not smart enough to produce something like:
mov eax, a
add eax, b
It is not critical though - I turn off overflow checking after debugging anyway.
> 2.) The version 2.0 of your source code does not compile with Microsoft
> Visual C++ 2005 Express Edition. (By the way, is it documented that
> I need Bison? I figured that out myself...):
You might want to try LLVM CVS. I believe there are several fixes in CVS
that were not in 2.0. If that doesn't work, we will gladly accept patches
to make it work.
> I fixed this by adding a ``return 0;`` at the end of the method. But why
> don't you just provide binaries for windows? I could send you the
> binaries that I built - I have not yet tested them though.
The LLVM community consists of volenteers, and noone volenteered for 2.0
I volunteer. As soon as I get everything to work.
Next problem: I now have the hello.bc file compiled. But how do I get an executable from this? I tried:
C:\Eigenes\compiler\llvm-2.0\win32\release>llvm-ld -o=hellow.exe hellow.bc
llvm-ld: Could not find llvm-stub.exe executable!
So, I don't have "llvm-stub.exe". But why did it not build one? And what is the
difference between "llvm-ld" and "llvm-link"? "llvm-link" does not work either.