Building self-hosting compiler in language "X", using LLVM

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Building self-hosting compiler in language "X", using LLVM

krcko
Hi to all LLVMers!

I'm new to LLVM and compilers at all (i did wrote few interpretators,
but thats not same as compiler), and i want to write compiler (which
compiles source to native code executebles - no VMs or runtime files)
for some language (i'll call it a language "X", as it don't have name
yet, cuz i'm desinging it - a hobby project of mine) and i want to
write compiler in that language ("X"), a self-hosting compiler as they
call it.

I have a little knowlage of x86 assembly, object file formats,
linkers, executables and all that stuff, so i first tought that i'm
going to make compiler which compiles to bytecode (like java) and then
execute it by virtual machine... but then i found about LLVM. And as
more as i read about it i like it very much. But, i'm no c++
programmer and i had troubles compiling llvm from source (mostly
becouse i'm on win32 machine), so i've downloaded compiled tools, and
i'm using them in chain with my compiler (code generator acctualy, cuz
it emits llvm ir code).

i just want to ask is there a way that someone might compile llvm
tools as static libraries, so i can link 'em with my compiler code and
result in just one executable? if this is already done please give me
a link, cuz i didn't found it.

thanx in advance!

Aleksandar
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Building self-hosting compiler in language "X", using LLVM

Nick Lewycky
krckoorascic wrote:
> i just want to ask is there a way that someone might compile llvm
> tools as static libraries, so i can link 'em with my compiler code and
> result in just one executable? if this is already done please give me
> a link, cuz i didn't found it.

Download the LLVM source and type "make". LLVM only builds static
libraries by default.

Nick Lewycky
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev