[cfe-dev] Using Xcode to compile clang, still possible ?

Nat! nat at mulle-kybernetik.com
Tue Nov 25 03:12:55 PST 2014

On 24 Nov 2014, at 19:57, Reid Kleckner <rnk at google.com> wrote:

> It looks like you are trying to use the so-called "standalone" clang build, but you checked out clang into llvm/tools/clang. You only need to put clang sources in llvm/tools/clang if you want it to be part of the LLVM build. If you move the sources out to somewhere alongside the llvm sources, the standalone build will probably work. I did this with VS a few weeks ago.

Thanks, that was very helpful and it got me further along the way.

Unfortunately I am also a cmake newbie as well...

I moved llvm/tools/clang away and built llvm again. Then I tried to build clang separately in its own build directory thusly:

nat at kempe:build(^) $ cmake -DCLANG_PATH_TO_LLVM_SOURCE=../../clang-test/llvm -DCLANG_PATH_TO_LLVM_BUILD=../../clang-test/build -DCMAKE_BUILD_TYPE=Debug ../clang
-- Found LLVM_CONFIG as /Volumes/Source/srcM/clang-test/build/bin/llvm-config
CMake Error at /Volumes/Source/srcM/clang-test/build/share/llvm/cmake/HandleLLVMOptions.cmake:38 (message):
  Host Clang must be able to find libstdc++4.7 or newer!
Call Stack (most recent call first):
  CMakeLists.txt:96 (include)

-- Configuring incomplete, errors occurred!
See also "/Volumes/Source/srcM/mulle-clang/build/CMakeFiles/CMakeOutput.log".
See also "/Volumes/Source/srcM/mulle-clang/build/CMakeFiles/CMakeError.log".

On a hunch (http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20140106/200545.html) I edited - in the llvm build directory "./../clang-test/build/" - the "CMakeCache.txt" file for LLVM_ENABLE_LIBCXX:BOOL=ON  and cmaked/build all of llvm.

But the same error persists, probably because I don't understand how cmake works.

Ignorance more frequently begets confidence than does
knowledge  -- Darwin

More information about the cfe-dev mailing list