You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by sy...@apache.org on 2023/11/07 08:15:18 UTC
(tvm) branch main updated: [Fix] Broken Windows Build with LLVM (#16081)
This is an automated email from the ASF dual-hosted git repository.
syfeng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git
The following commit(s) were added to refs/heads/main by this push:
new 641225a5c5 [Fix] Broken Windows Build with LLVM (#16081)
641225a5c5 is described below
commit 641225a5c53bb1cd9267286c91b9521a6e6be351
Author: Junru Shao <ju...@apache.org>
AuthorDate: Tue Nov 7 00:15:12 2023 -0800
[Fix] Broken Windows Build with LLVM (#16081)
PR #16032 introduces a more stable way of zstd path finding by relying
on LLVM's existing Findzstd module, but it turns out that the cmake dir
from `llvm-config` is not very compatible with CMake's internal
convention, and thus a conversion is required to get rid of the error
message below:
```
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
D:/a/package/package/tvm/build/CMakeFiles/CMakeScratch/TryCompile-tnlfb1/CMakeLists.txt:2
-- Configuring incomplete, errors occurred!
when parsing string
C:\Miniconda\envs\tlcpack-build\Library\lib\cmake\llvm
Invalid character escape '\M'.
```
---
cmake/utils/FindLLVM.cmake | 1 +
1 file changed, 1 insertion(+)
diff --git a/cmake/utils/FindLLVM.cmake b/cmake/utils/FindLLVM.cmake
index fe236e299c..a6abf25d15 100644
--- a/cmake/utils/FindLLVM.cmake
+++ b/cmake/utils/FindLLVM.cmake
@@ -118,6 +118,7 @@ macro(find_llvm use_llvm)
if(NOT "${__llvm_exit_code}" STREQUAL "0")
message(FATAL_ERROR "Fatal error executing: ${LLVM_CONFIG} --cmakedir")
endif()
+ cmake_path(SET "__llvm_cmakedir" "${__llvm_cmakedir}")
message(STATUS "LLVM cmakedir: ${__llvm_cmakedir}")
# map prefix => $
# to handle the case when the prefix contains space.