We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c09a7e7 commit f3b7c0aCopy full SHA for f3b7c0a
cmake/util/FindLLVM.cmake
@@ -37,8 +37,9 @@ macro(find_llvm use_llvm)
37
execute_process(COMMAND ${LLVM_CONFIG} --cxxflags
38
OUTPUT_VARIABLE __llvm_cxxflags)
39
execute_process(COMMAND ${LLVM_CONFIG} --version
40
- COMMAND cut -b 1,3
41
- OUTPUT_VARIABLE TVM_LLVM_VERSION)
+ OUTPUT_VARIABLE __llvm_version)
+ # llvm version
42
+ string(REGEX REPLACE "^([^.]+)\.([^.])+\.[^.]+.*$" "\\1\\2" TVM_LLVM_VERSION ${__llvm_version})
43
# definitions
44
string(REGEX MATCHALL "(^| )-D[A-Za-z0-9_]*" LLVM_DEFINITIONS ${__llvm_cxxflags})
45
# include dir
0 commit comments