Standalone compiler

First off, I like the look of this project.

I am considering retargeting my language from .NET & Parrot to LLVM. Its either this, or add a Java backend. I’m probably going to scrap the Parrot support, but it will still leave me with 2 backends. The only reason I am considering LLVM is as a compiler / code generator, not as a VM.

Immediately I have several questions regarding dependencies. I gather from the docs that the output is for GNU assembler, however, does this require that gas be installed for a user of my compiler, or is there a direct code generation option (as I see there is a JIT)?

Is it practical to implement a standalone compiler with LLVM, or are there dependencies that will require GNU / GPL packages?

Thanks,

Melvin

First off, I like the look of this project.

I am considering retargeting my language from .NET & Parrot to LLVM. Its either this, or add a Java backend. I’m probably going to scrap the Parrot support, but it will still leave me with 2 backends. The only reason I am considering LLVM is as a compiler / code generator, not as a VM.

Ok.

Immediately I have several questions regarding dependencies. I gather from the docs that the output is for GNU assembler, however, does this require that gas be installed for a user of my compiler, or is there a direct code generation option (as I see there is a JIT)?

You have a couple options:

  1. You can output a .s file and use an existing assembler to build it.
  2. You can use the JIT, which requires no external tools.
  3. You can output a C file with the C backend (subject to many restrictsions) if you have a C compiler.
  4. You can make use of some of the direct .o file writing stuff that is being worked on, but you still need a native linker for it. This will probably become real sometime in the next 3-12 months.

Is it practical to implement a standalone compiler with LLVM, or are there dependencies that will require GNU / GPL packages?

I think that there are decent BSD-licensed assemblers and linkers out there, if that is more to your style.

-Chris