Skip to content

Commit

Permalink
[Bugfix][Build] Fix building with LLVM-10 on macOS (apache#5859)
Browse files Browse the repository at this point in the history
  • Loading branch information
junrushao authored and Trevor Morris committed Jun 30, 2020
1 parent b8881fe commit d284ba2
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 d284ba2

Please sign in to comment.