[LLVMdev] Preferring to use GCC instead of LLVM
Nick Lewycky
nicholas at mxc.ca
Sat May 10 21:04:00 PDT 2008
I think people have already responded to most of your points, but I
didn't see this one addressed yet.
kr512 wrote:
> Chris Lattner wrote:
>> However, an own front-end (clang) is in the works, which
>> will remove this dependency.
>
> That doesn't help us. We have a front-end. We need a
> back-end. But LLVM is an incomplete backend because LLVM
> by itself cannot generate ready-to-execute .EXE or .DLL
> file.
If you run "llc -help" you'll find this fragment:
-filetype - Choose a file type (not all types are
supported by all targets):
=asm - Emit an assembly ('.s') file
=obj - Emit a native object ('.o') file
[experimental]
=dynlib - Emit a native dynamic library
('.so') file [experimental]
It so happens that because LLVM has a JIT, it already knows how to emit
actual executable code instead of textual assembly. However, as the
[experimental] indicates -- it doesn't entirely work yet.
Although we can emit the opcodes in binary form, support for the
container formats isn't working properly. Thus far, there's an
unfinished ELFWriter and MachOWriter in lib/Codegen/. Those could be
finished, and PEWriter could be added for Win32 support. No one has done
it yet (we just use 'gas' under the hood like gcc does).
If this is blocking you from using LLVM, please consider whether it'd be
easier to write this for us than to use something else.
Nick Lewycky
More information about the llvm-dev
mailing list