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

Nat! nat at mulle-kybernetik.com
Tue Nov 25 05:50:26 PST 2014


On 25 Nov 2014, at 12:41, Nat! <nat at mulle-kybernetik.com> wrote:

> 
> On 25 Nov 2014, at 12:35, Nikola Smiljanic <popizdeh at gmail.com> wrote:
> 
>> Are you sure those cmake variables are ok? If I move clang out of source and try to configure using cmake gui I can't see any variables with CLANG_ prefix?
> 
> I am not sure at all, I am just parroting what I gleaned from that blog entry I mentioned in my first posting.
> 
> But when I just do 
> 
> cmake ../clang
> 
> the error message is the same. (I have to build llvm anyway it seems, because otherwise I don't get llvm-config.)
> 
> Ciao
>   Nat!

Ok, having experimented a bit, llvm-config seems to provide the compiler flags needed for the clang build. So specifying those additional CLANG_ variables is maybe superflous, but maybe not. The Xcode installation itself unfortunately does not seem to provide a llvm-config (I couldn't find any).

nat at kempe:build(^) $ ../../clang-test/build/bin/llvm-config --cxxflags
-I/Volumes/Source/srcM/clang-test/llvm/include -I/Volumes/Source/srcM/clang-test/build/include  -stdlib=libc++ -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -std=c++11   -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS

Ciao
   Nat!
---------------------------------------------------
Java's the worst thing -- good way to make things a 
tenth as fast as they should be. - J. Carmack







More information about the cfe-dev mailing list