[LLVMdev] llvm-config prototype (was: Getting Started with LLVM)

Reid Spencer reid at x10sys.com
Sat Mar 18 19:10:45 PST 2006


Hi Eric,

I do most of the maintenance on the configuration and Makefile stuff.
So, I would like a copy of this to try out.

Thanks,

Reid.

On Sat, 2006-03-18 at 17:25 -0500, Eric Kidd wrote:
> On Mar 16, 2006, at 2:16 AM, Chris Lattner wrote:
> > On Wed, 15 Mar 2006, Eric Kidd wrote:
> >> OK! Would something like the following interface be a reasonable  
> >> first approach?
> >>
> >>  llvm-config (--cxxflags | --ldflags | --libs) (all | jit)
> >>    --cxxflags: Flags to use when compiling C++ source code.
> >>    --ldflags: Linker flags to use when linking against LLVM.
> >>    --libs: Libraries needed to link the current configuration.
> >>    all: Link all LLVM libraries for the current platform.
> >>    jit: Link the libraries needed by the standard JIT/interpreter  
> >> configuration.
> >
> > Sounds great.
> 
> OK! I've implemented a simple version of llvm-config, just to give us  
> something concrete to talk about. :-) I'll send you the patch in a  
> separate, off-list message. If anybody else would like a copy, just ask.
> 
> llvm-config supports the following options:
> 
>    --version              LLVM version.
>    --prefix               Installation prefix.
>    --bindir               Directory containing LLVM executables.
>    --includedir           Directory containing LLVM headers.
>    --libdir               Directory containing LLVM libraries.
>    --cxxflags             C++ compiler flags for file which include  
> LLVM headers.
>    --ldflags              Linker flags.
>    --libs <COMPONENT>...  Libraries needed to link against LLVM  
> components.
> 
> Right now, the only useful component is the JIT:
> 
>    jit                    LLVM JIT compiler.
> 
> I get this set of dependencies using:
> 
>    LLVMLIBS := JIT
>    SUB_JITOBJS=$(LLVMUsedLibs)
> 
> It's very easy to dump a Makefile variable to the llvm-config script,  
> so the only obstacle to adding more configurations is modularizing  
> the code which processes LLVMLIBS.
> 
> > I would be quite happy to have a hard-coded list of library  
> > dependencies, even if it means that we need to manually maintain  
> > them.  This will force us to realize and think about what  
> > dependencies there are between libraries.
> 
> This is a good idea.  I'm not quite sure how to process a dependency  
> list using /bin/sh, but maybe inspiration will strike me. :-)
> 
> If there's any changes you'd like me to make to this patch, please  
> let me know! This is just a minimalist version to spur further  
> discussion.
> 
> Cheers,
> Eric
> 
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20060318/15a22da2/attachment.sig>


More information about the llvm-dev mailing list