[PATCH] D88176: Explicitly specify CMAKE_AR in WinMsvc.cmake

Gwen Mittertreiner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 23 11:42:02 PDT 2020


gmittert created this revision.
gmittert added a reviewer: smeenai.
Herald added subscribers: llvm-commits, mgorny.
Herald added a project: LLVM.
gmittert requested review of this revision.

As of cmake 3.18, cmake changes how it searches for compilers for
Windows and now finds llvm-ar instead of llvm-lib. This explicitly
specifies CMAKE_AR as llvm-lib so the correct program is found.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D88176

Files:
  llvm/cmake/platforms/WinMsvc.cmake


Index: llvm/cmake/platforms/WinMsvc.cmake
===================================================================
--- llvm/cmake/platforms/WinMsvc.cmake
+++ llvm/cmake/platforms/WinMsvc.cmake
@@ -232,6 +232,7 @@
 set(CMAKE_C_COMPILER "${LLVM_NATIVE_TOOLCHAIN}/bin/clang-cl" CACHE FILEPATH "")
 set(CMAKE_CXX_COMPILER "${LLVM_NATIVE_TOOLCHAIN}/bin/clang-cl" CACHE FILEPATH "")
 set(CMAKE_LINKER "${LLVM_NATIVE_TOOLCHAIN}/bin/lld-link" CACHE FILEPATH "")
+set(CMAKE_AR "${LLVM_NATIVE_TOOLCHAIN}/bin/llvm-lib" CACHE FILEPATH "")
 
 # Even though we're cross-compiling, we need some native tools (e.g. llvm-tblgen), and those
 # native tools have to be built before we can start doing the cross-build.  LLVM supports


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88176.293821.patch
Type: text/x-patch
Size: 709 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200923/267c98e7/attachment.bin>


More information about the llvm-commits mailing list