building llvm and clang on Mac OS X

I used that script to build and install the latest svn pull. But it doesn’t work!

Thu 11:41:16 ip2 yost /Volumes/x/llvm
0 244 Z% cat x.cc
void foo(void) {}
Thu 11:41:19 ip2 yost /Volumes/x/llvm
0 245 Z% clang++ x.cc
error: unable to execute command: . is not executable
error: clang frontend command failed due to signal 1 (use -v to see invocation)

The released binary clang++ doesn’t exhibit this problem.

Some more notes about installation

  1. The instructions don’t say to do
    gmake install

  2. For me, gmake install created these with restrictive permissions:
    /usr/local/docs
    /usr/local/include/llvm*
    /usr/local/include/clang*

  3. gmake uninstall did not remove
    /usr/local/bin/llvm-config
    /usr/local/lib/clang/
    /usr/local/lib/LLVMHello.dylib
    /usr/local/bin/profile_rt.dylib
    /usr/local/include/llvm/
    /usr/local/include/clang/
    /usr/local/include/clang-c/

Dave

%buildclang.sh (123 Bytes)

buildclang.sh (2.11 KB)