<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
</head>
<body text="#000000" bgcolor="#ffffff">
<font size="-1"><font face="Ubuntu Mono">Hi,<br>
<br>
Building Clang on Windows with the Cmake
"BUILD_SHARED_LIBS=true" flag fails with linker errors. <br>
The problem seems to be due to a circular dependency between the
clangSerialization and clangFrontend libraries.</font></font><font
size="-1"><font face="Ubuntu Mono"><br>
<br>
Library dependencies have not been listed in the CMakeLists.txt
file for Serialization, as can be seen below.<br>
<br>
<b>$ cat llvm/tools/clang/lib/Serialization/CMakeLists.txt <br>
# TODO: This must need some dependencies, but it builds fine
without them.<br>
#set(LLVM_USED_LIBS ???)<br>
</b><br>
add_clang_library(clangSerialization<br>
ASTCommon.h<br>
ASTReaderInternals.h<br>
...<br>
<br>
</font></font><font size="-1"><font face="Ubuntu Mono">Interestingly,
Clang builds fine on Linux with the shared option enabled.</font></font><br>
<font size="-1"><font face="Ubuntu Mono"><br>
For my own purposes, I had solved the issue for now by combining
clangFrontend and clangSerialization into a single library.</font></font><font
size="-1"><font face="Ubuntu Mono"><br>
</font></font><font size="-1"><font face="Ubuntu Mono">Is this a
known issue.<br>
<br>
</font></font><small><font size="-1"><small><font face="Ubuntu
Mono"><big> Deepak Panickal</big></font></small></font></small><br>
</body>
</html>