krckoorascic
2008-Jan-28 04:32 UTC
[LLVMdev] Building self-hosting compiler in language "X", using LLVM
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
Nick Lewycky
2008-Jan-28 04:39 UTC
[LLVMdev] Building self-hosting compiler in language "X", using LLVM
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