[cfe-dev] Circular dependency - clangSerialization and clangFrontend libraries

Deepak Panickal deepak at codeplay.com
Fri Nov 18 03:31:26 PST 2011


Hi,

Building Clang on Windows with the Cmake "BUILD_SHARED_LIBS=true" flag 
fails with linker errors.
The problem seems to be due to a circular dependency between the 
clangSerialization and clangFrontend libraries.

Library dependencies have not been listed in the CMakeLists.txt file for 
Serialization, as can be seen below.

*$ cat llvm/tools/clang/lib/Serialization/CMakeLists.txt
# TODO: This must need some dependencies, but it builds fine without them.
#set(LLVM_USED_LIBS ???)
*
add_clang_library(clangSerialization
   ASTCommon.h
   ASTReaderInternals.h
...

Interestingly, Clang builds fine on Linux with the shared option enabled.

For my own purposes, I had solved the issue for now by combining 
clangFrontend and clangSerialization into a single library.
Is this a known issue.

Deepak Panickal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20111118/d60a5508/attachment.html>


More information about the cfe-dev mailing list