[cfe-dev] cmake & vc++: clang vs. libclang woes

Ted Kremenek kremenek at apple.com
Mon Apr 11 13:00:40 PDT 2011


On Apr 11, 2011, at 10:41 AM, Óscar Fuentes wrote:

> Hello Ted,
> 
> Ted Kremenek <kremenek at apple.com> writes:
> 
>> On Apr 9, 2011, at 7:37 PM, Óscar Fuentes wrote:
>> 
>>> I've renamed libclang's output name to libclang. This way we create
>>> libclang.dll on Windows and liblibclang.a elsewhere. 
>> 
>> Hi Oscar,
>> 
>> I know this is well-intended, but this really isn't wonderful for
>> those of us not developing on Windows.  From a user standpoint, this
>> looks like a bug, as the Makefile-based produces a different output
>> than the CMake-based build.
> 
> I'm not happy with it either, that's the reason it took several days
> from the bug report to the change. But what else could we do? VS
> generates a series of files for each executable (.exe or .dll) using the
> executable's basename as a default. There are options for changing the
> name of the .pdb, but AFAIK there is no option for chaning the name of
> the .ilk (incremental linker info file), and there are others such as
> the .lib and .exp files which are created for EXEs too due to a bug on
> VS. It's a minefield. Considering that the VS build was broken and cmake
> is the only method for building LLVM with VS, I was forced to make that
> change.
> 
> If anyone knows a better solution, I'll be happy to hear it.

Hi Oscar,

I unfortunately don't have a better solution; I'm not an expert on CMake, and I understand this solution was not taken lightly.

That said, is this mainly an inherent limitation in the CMake build system?  If so, should we file a bug against CMake so that we can do the "right thing" later?

Ted



More information about the cfe-dev mailing list