[LLVMdev] How to build the 'example' projects ?

Manasij Mukherjee manasij7479 at gmail.com
Thu Sep 6 01:40:38 PDT 2012

I'm not very familiar with the autotools, so please bear with this
message if the solution is too obvious.
I am using 64 bit Linux and gcc 4.7.1.
I just built llvm and clang from the trunk and as the binaries
installed in /usr/local/bin seem to be working correctly, I guess the
compilation has gone okay.

Note that, at this point, I'm not trying to make a  separate project,
which is all what the documentation seems to focus upon .
I am trying to correctly build the programs in the llvm/examples
directory and can't find how to.
The examples directory contain a CMakeLists.txt, so I tried cmake,
giving the error:
# Unknown CMake command "add_llvm_example".
Also, each individial sub folder has a Makefile, running which gives,
for example:
[manasij7479 at manasijd HowToUseJIT]$ make
../../Makefile.common:60: ../../Makefile.config: No such file or directory
../../Makefile.common:68: /Makefile.rules: No such file or directory
make: *** No rule to make target `/Makefile.rules'.  Stop.
I tried copying individial projects to the llvm/projects directory and
follow the instructions in http://llvm.org/docs/Projects.html only to
get the exact same errors.
It'd be great if anyone could assist me or point me to a documentation
which gives some instructions.

Manasij Mukherjee

More information about the llvm-dev mailing list