[LLVMdev] Help setting up a llvm project
Reid Spencer
reid at x10sys.com
Sun Nov 27 18:36:56 PST 2005
Hi Mike,
Sounds like an interesting project. Here's some ideas for you on the LLVM
Makefile System.
If you haven't, I *strongly* suggest you read the makefile and project
documentation (docs/MakefileGuide.html and docs/Projects.html). There is much
information there that you need to understand.
LLVM is set up so that a single directory builds a single result. Since your
source code is fairly large, I would suggest that you allow LLVM to recurse
into subdirectories and build archive libraries for each of those directories.
You can then use libtool to assemble a finale archive, object or shared object
from the compiled archives. I don't believe LLVM has this capability built into
its rules, but we could add it once you've figured out the details.
Note that libtool can automatically rip apart archives and recombine them into
larger libraries. Read up on libtool for further information.
Reid.
Mike Emmel wrote:
> First I'd like to let you know I've started working on porting gcjx to llvm.
> Some other intrested people may help but I've just started the project.
>
> My first question is I'm porting gcjx over to use the llvm build
> system I've successfully created a number of libraries but gcjx uses a
> number of sub directories for its source and I'd like the .o files for
> all of them to become one library.
>
> I can't seem to find a way to do that llvm seems to want all sources
> in one directory.
>
> If I do something like
>
> SOURCES += aot/aotclass.cc aot/aotfactory.cc aot/mangle.cc
>
> I get the follwing error
> GC heuristics: --param ggc-min-expand=81 --param ggc-min-heapsize=95905
> aot/aotclass.cc:301: fatal error: opening dependency file
> /media/WDC_Combo/home/memmel/GTK2.7/Qspin/Developer/Source/Languages/Core/Source/core/lib/compiler/gcjx/Debug/aot/aotclass.CXXd:
> No such file or directory
> compilation terminated.
This is telling you that it couldn't find the dependency file for C++. That's
because there's no "aot" directory in the Debug directory (where the dependency
files are normally placed). That's probably a bug in the makefiles, but your
usage is a little unusual too (i.e. the design parameters of the makefile
system didn't presume your usage scenario).
> and trying to get them to had via LIBS as one big object file seems to
> fail also.
I don't understand "trying to get them to had via LIBS". As I said earlier,
your best bet is to just build each sub-directory individually and then
reassemble a larger library from the component archives built in other directories.
>
>
> Mike
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
More information about the llvm-dev
mailing list