File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -271,8 +271,16 @@ else()
271271 )
272272endif ()
273273
274+ if (USE_PREBUILT_LLVM AND UNIX )
275+ # llvm_map_components_to_libnames(... all) returns empty string if llvm is
276+ # pre-built locally in either static or shared type in Ubuntu 22.04 container.
277+ execute_process (COMMAND llvm-config --libs all OUTPUT_VARIABLE ALL_LIBS)
278+ string (REGEX REPLACE "( |\r |\n |-l)+" ";" ALL_LLVM_LIBS ${ALL_LIBS} )
279+ set (ALL_LLVM_LIBS "LLVMSPIRVLib${ALL_LLVM_LIBS} " )
280+ else ()
281+ llvm_map_components_to_libnames(ALL_LLVM_LIBS all )
282+ endif ()
274283set (OPENCL_CLANG_EXCLUDE_LIBS_FROM_ALL "" CACHE STRING "Space-separated list of LLVM libraries to exclude from all" )
275- llvm_map_components_to_libnames(ALL_LLVM_LIBS all )
276284if (NOT "${OPENCL_CLANG_EXCLUDE_LIBS_FROM_ALL} " STREQUAL "" )
277285 list (REMOVE_ITEM ALL_LLVM_LIBS ${OPENCL_CLANG_EXCLUDE_LIBS_FROM_ALL} )
278286endif ()
You can’t perform that action at this time.
0 commit comments