[LLVMdev] Getting Started with LLVM
emk.lists at gmail.com
Fri Mar 10 12:42:28 PST 2006
On Mar 10, 2006, at 2:57 PM, Martin Pärtel wrote:
> I'm currently using the "make install"-ed version of LLVM in an
> autoconf/automake project. Setting it up wasn't that bad really.
> The .a
> libraries can be statically linked with the -l flag and .o
> libraries are
> simply linked in as normal object files (without -l). All the
> libraries got
> installed to $(prefix)/lib and all headers went into $(prefix)/
> just like with any other library. Also, -D__STDC_LIMIT_MACROS had
> to be added
> to the compiler options for some header to work correctly but that
> was pretty
> much it.
Thanks for your advice! I did get everything working (eventually) by
pasting the following code into the Makefile for HowToUseJIT:
@echo Compile: $(Compile.CXX)
@echo Link: $(Link)
@echo Libs: $(LLVMUsedLibs)
...and using the result. But this is still pretty fragile, and needs
be done once for every supported platform.
Gnome (and many other Unix projects with massively ugly dependencies)
can be linked trivially using a "foo-config" script. If LLVM had
something similar, it might save new LLVM developers several hours of
digging through manuals and Makefiles.
A llvm-config script would be absolutely trivial to generate from the
current Makefiles, and--if people think it would be a Good Thing--I'm
volunteering to do all the legwork. :-)
> I asked a similar question here about a month ago and Chris answered:
> "make install is lightly tested, but should work. Please report any
> problems you find."
Yup, the installed headers and libraries seem sufficient so far.
Linking is slow, but that's to be expected for such a big C++ project.
> Personally, I've found LLVM to be a pleasure to work with. Its
> design is very
> powerful, which simplifies many things a lot.
Oh, you don't have to convince me of that! LLVM's design is so
elegant (compared to some compiler backends I've seen) that it really
ought to have theme music or something. :-)
More information about the llvm-dev