[CMake] Finding libxml2 when building llvm/clang

Edward Diener eldlistmailingz at tropicsoft.com
Tue Jun 14 20:28:15 EDT 2016


Building llvm/clang from source involves using CMake. I am building 
llvm/clang from source on Windows using CMake 3.5.2. I am not a clang 
developer, just a clang user. Similarly I just use CMake rather than 
understand or write CMakeLists.txt files.

I reported a problem to clang where building a 32-bit version of clang 
succeeds but building a 64-bit version of clang fails with xml link 
errors. I have A 32-bit libxml2 binary in my path from gnuwin32, but not 
a 64-bit binary of libxml2 in my path.

I was told by clang developers that one of the tools which clang builds 
uses xml and libxml2 if it is available, otherwise uses some other 
technology for the tool. The suggestion was that the problem I am 
encountering is that of CMake; that CMake does not recognize that the 
libxml2 which I have is the 32-bit version and instead thinks that it is 
the 64-bit version and therefore attempts erroneously to use it in the 
64-bit build of clang.

Does anybody know what might be happening here ? I do not create the 
CMakeLists.txt files used by llvm/clang so I do not know how the use of 
libxml2 can be optionally specified in them.



More information about the CMake mailing list