[PATCH] D148751: [CMake] Add llvm-lib to Clang bootstrap dependency for LTO builds on Windows

Igor Kudrin via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 19 21:44:38 PDT 2023


ikudrin updated this revision to Diff 515215.
ikudrin marked an inline comment as done.
ikudrin added a comment.

- `WIN32` -> `MSVC`

Thanks!


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D148751/new/

https://reviews.llvm.org/D148751

Files:
  clang/CMakeLists.txt


Index: clang/CMakeLists.txt
===================================================================
--- clang/CMakeLists.txt
+++ clang/CMakeLists.txt
@@ -613,6 +613,9 @@
       # 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)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148751.515215.patch
Type: text/x-patch
Size: 700 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230420/c3f64d89/attachment-0001.bin>


More information about the cfe-commits mailing list