Skip to content

Commit

Permalink
[Bugfix][Build] Fix building with LLVM-10 on macOS (#5859)
Browse files Browse the repository at this point in the history
  • Loading branch information
junrushao committed Jun 22, 2020
1 parent 7902d0f commit 03567b4
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion cmake/util/FindLLVM.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,16 @@ macro(find_llvm use_llvm)
set(LLVM_CONFIG ${use_llvm})
if(LLVM_CONFIG STREQUAL "ON")
find_package(LLVM REQUIRED CONFIG)
llvm_map_components_to_libnames(LLVM_LIBS all)
llvm_map_components_to_libnames(LLVM_LIBS "all")
if (NOT LLVM_LIBS)
message(STATUS "Not found - LLVM_LIBS")
message(STATUS "Fall back to using llvm-config")
set(LLVM_CONFIG "llvm-config")
else()
set(LLVM_CONFIG "ON")
endif()
endif()
if(LLVM_CONFIG STREQUAL "ON")
list (FIND LLVM_LIBS "LLVM" _llvm_dynlib_index)
if (${_llvm_dynlib_index} GREATER -1)
set(LLVM_LIBS LLVM)
Expand Down

0 comments on commit 03567b4

Please sign in to comment.