[cfe-dev] Building clang with MingW and MSYS

Edward Diener eldlistmailingz at tropicsoft.com
Wed Mar 16 16:00:47 PDT 2011


On 3/16/2011 6:06 PM, Óscar Fuentes wrote:
> Edward Diener<eldlistmailingz at tropicsoft.com>
> writes:
>
>>> The error is emitted after testing for the presence on the source tree
>>> of the file
>>>
>>> include/llvm/Config/config.h
>>>
>>> That file is generated by the configure script of by cmake.
>>>
>>> Are you using the same sources you previously used for building with VS
>>> in-source?'
>>
>> Yes.
>>
>>>   If yes, you must start from a clean source directory. Some
>>> version control tools have commands for removing all unversioned files,
>>> but I don't know about svn.
>>
>> Wow, this is a wonderful build system, that can not even build clang for
>> two different compilers without conflict. Is this CMake or just 'Nix
>> configure ? OK, it is useless to complain about such things but this is
>> very poor. Maybe LLVM and Clang should consider something better.
>
> Please don't be so fast at reaching to conclusions. What you observed is
> something perfectly reasonable. First, you used cmake for building
> in-source. This creates several files mixed with the original source
> files (in-source means exactly that and the configure script does the
> same). Then you invoked the configure script from another
> directory. That error message you got is preventing you from building on
> a conflicting state, as the generated config.h and other files which are
> mixed with the source code may be inadequate for the configuration of
> your new build.
>
> If you plan to build the same source code with different settings,
> always do out-of-source builds.

OK, you are right and I should have realized that I should build outside 
the llvm source tree.

Still it seems a build system should be able to build something from 
more than one setup without conflict. In Boost I can build any given 
libraries with different compilers never having to worry about where the 
final result end up or from where I invoke the build system.




More information about the cfe-dev mailing list