[cfe-dev] Using clang/LLVM components in conventional apps?

Alexei Svitkine alexei.svitkine at gmail.com
Fri Jun 26 14:02:27 PDT 2009


Interestingly, when I changed the target settings to NOT use
precompiled/prefix headers, then all the C files compiled OK with
clang, but the C++ files (which as I understand are passed to gcc)
started failing with the same errors that clang was failing with when
trying to generate PCH - ie same headers not found. Those same
problems did not affect the C files.

-Alexei

On Fri, Jun 26, 2009 at 4:40 PM, Alexei
Svitkine<alexei.svitkine at gmail.com> wrote:
> Looks like I spoke too soon. As soon as it gets to file actually using
> stuff out of OS X headers, it dies horribly due to not finding PCH'd
> headers.
>
> -Alexei
>
> On Fri, Jun 26, 2009 at 4:37 PM, Alexei
> Svitkine<alexei.svitkine at gmail.com> wrote:
>> Interesting. After 'make install', it still gives the same errors, but
>> proceeds with the build just fine.
>>
>> Of note, the errors happen during PCH generation. I guess the way
>> Xcode expects gcc to do PCH is different than what clang supports or
>> some such...
>>
>> -Alexei
>>
>> On Fri, Jun 26, 2009 at 3:54 PM, Chris Lattner<clattner at apple.com> wrote:
>>> On Jun 26, 2009, at 12:27 PM, Alexei Svitkine wrote:
>>>>
>>>> I've build LLVM + clang from SVN using make. Am I required to "make
>>>> install" for it to find the right headers? (I just set CC to the bin
>>>> directory where clang is created by make.)
>>>
>>> I don't know if it's required, but I'd definitely try it :)
>>>
>>> -Chris
>>>
>>>>
>>>> -Alexei
>>>>
>>>> On Fri, Jun 26, 2009 at 3:23 PM, Chris Lattner<clattner at apple.com> wrote:
>>>>>
>>>>> On Jun 26, 2009, at 12:20 PM, Alexei Svitkine wrote:
>>>>>
>>>>>> Hmm - clang seems to be having trouble compiling Mac OS X headers:
>>>>>>
>>>>>>
>>>>>> Are these known issues? Is it possible to pass some flags or something
>>>>>> to clang to work-around these?
>>>>>
>>>>> This looks like clang isn't finding its versions of standard headers.
>>>>>  How
>>>>> did you build/install clang?
>>>>>
>>>>> -Chris
>>>>>
>>>
>>>
>>
>




More information about the cfe-dev mailing list