[cfe-dev] cmake & vc++: clang vs. libclang woes
Eric Niebler
eric at boostpro.com
Mon Apr 4 23:53:10 PDT 2011
On 4/5/2011 1:14 PM, Eric Niebler wrote:
> For a few days now I've been plagued by output target conflicts between
> the clang and libclang projects in Visual Studio. The errors I'm getting
> look like this:
<snip>
> At the very least, there is a bug in the CMake files because both these
> projects try to build bin/[config]/clang.pdb. There seems to be other
> conflicts too, leading to the above linker errors, but I can't track it
> down. (Maybe clang.exp or clang.obj or clang.lib?)
Yep, both projects use lib/[config]/clang.exp as their export library.
This causes havoc. I've worked around the problem by manually changing
the generated clang.vcproj to use "expclang" as the name of the import
library, which makes it generate lib/[clang]/expclang.exp and
lib/[config]/expclang.lib. This doesn't break anything because nobody
uses the exports from clang.exe. I'm not even sure why we're generating
an import library for clang.exe.
I've also turned off incremental linking for both clang.vcproj and
libclang.vcproj because they both try to use bin/[config]/clang.ilk as
their incremental link file.
If I knew more CMake, I would suggest a patch, but I'll leave that for
someone else.
--
Eric Niebler
BoostPro Computing
http://www.boostpro.com
More information about the cfe-dev
mailing list