Circular dependency - clangSerialization and clangFrontend libraries

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