[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 16:07:35 PDT 2020
gmittert updated this revision to Diff 293888.
gmittert edited the summary of this revision.
gmittert added a comment.
Updated to include cmake change in commit message.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88176/new/
https://reviews.llvm.org/D88176
Files:
llvm/cmake/modules/LLVMExternalProjectUtils.cmake
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
Index: llvm/cmake/modules/LLVMExternalProjectUtils.cmake
===================================================================
--- llvm/cmake/modules/LLVMExternalProjectUtils.cmake
+++ llvm/cmake/modules/LLVMExternalProjectUtils.cmake
@@ -56,6 +56,8 @@
set(ARG_TOOLCHAIN_TOOLS clang lld llvm-ar llvm-ranlib llvm-nm llvm-objdump)
if(_cmake_system_name STREQUAL Darwin)
list(APPEND ARG_TOOLCHAIN_TOOLS llvm-libtool-darwin llvm-lipo)
+ elseif(_cmake_system_name STREQUAL Windows)
+ list(APPEND ARG_TOOLCHAIN_TOOLS llvm-lib)
else()
# TODO: These tools don't fully support Mach-O format yet.
list(APPEND ARG_TOOLCHAIN_TOOLS llvm-objcopy llvm-strip)
@@ -144,7 +146,11 @@
endif()
endif()
if(llvm-ar IN_LIST TOOLCHAIN_TOOLS)
- list(APPEND compiler_args -DCMAKE_AR=${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-ar${CMAKE_EXECUTABLE_SUFFIX})
+ if(_cmake_system_name STREQUAL Windows)
+ list(APPEND compiler_args -DCMAKE_AR=${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-lib${CMAKE_EXECUTABLE_SUFFIX})
+ else()
+ list(APPEND compiler_args -DCMAKE_AR=${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-ar${CMAKE_EXECUTABLE_SUFFIX})
+ endif()
endif()
if(llvm-libtool-darwin IN_LIST TOOLCHAIN_TOOLS)
list(APPEND compiler_args -DCMAKE_LIBTOOL=${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-libtool-darwin${CMAKE_EXECUTABLE_SUFFIX})
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88176.293888.patch
Type: text/x-patch
Size: 2085 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200923/c2f780de/attachment.bin>
More information about the llvm-commits
mailing list