Author: Igor Kudrin Date: 2023-04-20T17:02:17-07:00 New Revision: 43c307fd690ffa97877f371ff18530fcd0bddd82
URL: https://github.com/llvm/llvm-project/commit/43c307fd690ffa97877f371ff18530fcd0bddd82 DIFF: https://github.com/llvm/llvm-project/commit/43c307fd690ffa97877f371ff18530fcd0bddd82.diff LOG: [CMake] Add llvm-lib to Clang bootstrap dependency for LTO builds on Windows Without this dependency, it is possible that llvm-lib.exe will not be built, in which case CMake will try to use lib.exe to build libraries, but this tool cannot handle bitcode files. Differential Revision: https://reviews.llvm.org/D148751 Added: Modified: clang/CMakeLists.txt Removed: ################################################################################ diff --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt index 1fff005d65251..4508ea4c77aa5 100644 --- a/clang/CMakeLists.txt +++ b/clang/CMakeLists.txt @@ -613,6 +613,9 @@ if (CLANG_ENABLE_BOOTSTRAP) # variable, and have LLVM's CMake append the envar to the archiver calls. set(LTO_LIBRARY -DDARWIN_LTO_LIBRARY=${LLVM_SHLIB_OUTPUT_INTDIR}/libLTO.dylib -DDYLD_LIBRARY_PATH=${LLVM_LIBRARY_OUTPUT_INTDIR}) + elseif(MSVC) + add_dependencies(clang-bootstrap-deps llvm-lib) + set(${CLANG_STAGE}_AR -DCMAKE_AR=${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-lib) elseif(NOT WIN32) add_dependencies(clang-bootstrap-deps llvm-ar llvm-ranlib) if(NOT BOOTSTRAP_LLVM_ENABLE_LLD AND LLVM_BINUTILS_INCDIR) _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits