[LLVMdev] llc -load....

s88 dave.tw at gmail.com
Mon Jan 24 21:32:18 PST 2005


Thank you...
I am preparing to build a simple C compiler for our new architecture.
According to your suggestion. I try to dynamically load my backend.
But I got the error message :  
llc :  target 'Your_Arch' does not support static compilation!

could you tell me where is this problem?


On Mon, 24 Jan 2005 22:53:15 -0600 (CST), Chris Lattner
<sabre at nondot.org> wrote:
> On Tue, 25 Jan 2005, s88 wrote:
> 
> > hello...
> > I have finish my backend. But I dont know how to install my backend...
> > llc -load=???Load what??
> > Can anyone teach me?
> > thanx.
> 
> There are two ways to do this.  You can either link the backend directly
> into llc (like the X86 or PowerPC backends, see tools/llc/Makefile), or
> you can dynamically load the backend.
> 
> To dynamically load the back end, add these two lines to your target
> makefile:
> 
> SHARED_LIBRARY = 1
> LOADABLE_MODULE = 1
> 
> This should build a DSO for your target (which will end with .so if you're
> on most unixy platforms).  You can load this with:
> 
>    llc --load ~/llvm/Debug/lib/yourlibrary.so -march=yourarch in.bc -o out.s
> 
> BTW, what architecture are you working with?
> 
> -Chris
> 
> --
> http://nondot.org/sabre/
> http://llvm.cs.uiuc.edu/
>




More information about the llvm-dev mailing list