diff --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt --- a/clang/CMakeLists.txt +++ b/clang/CMakeLists.txt @@ -595,6 +595,17 @@ add_dependencies(clang-bootstrap-deps lld) endif() + if (WIN32) + # Build llvm-rc on Windows so it can be used to build + # bootstrap runtime. + add_dependencies(clang-bootstrap-deps llvm-rc) + if(LLVM_ENABLE_LIBXML2) + # Build llvm-mt if libxml2 is enabled and available. + # the existance of libxml2 is checked in llvm/cmake/config-ix.cmake. + add_dependencies(clang-bootstrap-deps llvm-mt) + endif() + endif() + # If the next stage is LTO we need to depend on LTO and possibly lld or LLVMgold if(BOOTSTRAP_LLVM_ENABLE_LTO OR LLVM_ENABLE_LTO AND NOT LLVM_BUILD_INSTRUMENTED) if(APPLE)