[LLVMdev] Re: New llvmgcc4 snapshot

Chris Lattner sabre at nondot.org
Sat May 13 13:01:13 PDT 2006

On Sat, 13 May 2006, Vladimir Prus wrote:
>> There's a new snapshot of llvmgcc4 available here:
>> http://nondot.org/sabre/2006-05-08-llvm-gcc-4.tar.gz
> Chris,
> is there any chance that the new frontend will support dynamic loading of
> backends? I.e:
>  llvm-g++ -load my_backend.so -march=my_arch a.c

Sure, we can add support for whatever we want :).  There are two pieces to 
this, modifying the driver and modifying the compiler to accept the 
option.  I'd suggest looking at how I added the -emit-llvm option as an 

However, what is the goal of this?  IS this because you are you rapidly 
changing your backend, and don't want to recompile it all the time?  If 
so, one technique I use a lot is:

$ llvm-gcc -emit-llvm x.c -S -o - | gccas | llc

Which obviously doesn't require you to recompile cc1.  Another potential 
option would be to link the target in as a .so file.

I'm not sure how much makefile hackery any of these changes would take, 
but probably not much.  Check out how the targets are selected in 



More information about the llvm-dev mailing list