Using LLVM on OS X 10.9.5

Hi there,

I’m trying to get set up to build things using the LLVM libraries and I’m running into issues with my toolchain.

Specifically, they seem to revolve around getting the correct versions of tools, the linker not being able to find certain .a files.

So my quick specific question is, will it be problematic if I install llvm under say /usr? Any known pitfalls?

More context follows:
Currently, I have a downloaded copy of LLVM 3.5 along with Clang, compiler-rt, libcxx, libcxxabi all extracted to the appropriate places in the source tree, and I’m building it using Cmake. This builds correctly, but I’m not sure how to setup my project to use both the tools and the libraries that are built from this source tree.

I’ve read through the page on creating an LLVM project, and combined with that information and the information on building LLVM with Cmake, I decided to put my new project in the projects subdirectory of llvm source. My CMakeLists.txt file is attached. Using this strategy my code is included in the LLVM build, but when I try to include LLVM support for doing command line processing I get the output in out.txt. The output of running env is in env.txt.

If anybody has any suggestions on reading I should do to prepare my toolchain better I would be very appreciative. Also, comments and suggestions about how to setup this new project would be greatly appreciated.

CMakeLists.txt (304 Bytes)

out.txt (957 Bytes)

env.txt (1.4 KB)