I did these steps:
* checked out llvm trunk, and clang trunk
* created symbolic link llvm/tools/clang
* created separate folder: llvm-objects
* run configure and gmake in llvm-objects
It builds ok until it hits clang, at which point I get an this error:
gmake: Entering directory `/tmp/llvm-svn/llvm-objects/tools/clang'
Makefile:44: Makefile.config: No such file or directory
Makefile:127: /Makefile.rules: No such file or directory
gmake: *** No rule to make target `/Makefile.rules'. Stop.
gmake: Leaving directory `/tmp/llvm-svn/llvm-objects/tools/clang'
gmake: *** [clang/.makeinstall] Error 2
gmake: Leaving directory `/tmp/llvm-svn/llvm-objects/tools'
gmake: *** [install] Error 1
can you tell what commands exactly did you use?
What I usually do is:
svn co llvm…
svn co llvm/tools/clang
Try something similar by running “…/configure”, it should work.
I've built clang+llvm in an object directory successfully, and I'm
sure others have. I'd guess the problem is the symlink, so I'd give
it a shot without it.
I use a symbolic link to clang and never had any trouble with it...
I did something like this:
svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
svn co http://llvm.org/svn/llvm-project/llvm/trunk clang
ln -s clang llvm/tools/clang
../llvm/configure --prefix=/my/llvm/prefix <other options>
Ok, now I see what I am doing wrong: clang checkout should be:
svn co http://llvm.org/svn/llvm-project/cfe/trunk clang
No, clang isn't built in the object directory, even without symlink
Do I need to run 'mkdir llvm-objects/tools/clang' and configure there separately ?
No you should be able to just configure, since you originally checked
out llvm twice you should actually checkout clang and then reconfigure
the whole thing.