Skip to content

Commit

Permalink
[WIN] Fix a bug in find_llvm when specify llvm-config (apache#2758)
Browse files Browse the repository at this point in the history
  • Loading branch information
leeexyz authored and wweic committed Mar 12, 2019
1 parent d459a37 commit 9df2d01
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmake/util/FindLLVM.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ macro(find_llvm use_llvm)
execute_process(COMMAND ${LLVM_CONFIG} --cxxflags
OUTPUT_VARIABLE __llvm_cxxflags)
execute_process(COMMAND ${LLVM_CONFIG} --version
COMMAND cut -b 1,3
OUTPUT_VARIABLE TVM_LLVM_VERSION)
OUTPUT_VARIABLE __llvm_version)
# llvm version
string(REGEX REPLACE "^([^.]+)\.([^.])+\.[^.]+.*$" "\\1\\2" TVM_LLVM_VERSION ${__llvm_version})
# definitions
string(REGEX MATCHALL "(^| )-D[A-Za-z0-9_]*" LLVM_DEFINITIONS ${__llvm_cxxflags})
# include dir
Expand Down

0 comments on commit 9df2d01

Please sign in to comment.