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()
271
271
)
272
272
endif ()
273
273
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 ()
274
283
set (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 )
276
284
if (NOT "${OPENCL_CLANG_EXCLUDE_LIBS_FROM_ALL} " STREQUAL "" )
277
285
list (REMOVE_ITEM ALL_LLVM_LIBS ${OPENCL_CLANG_EXCLUDE_LIBS_FROM_ALL} )
278
286
endif ()
You can’t perform that action at this time.
0 commit comments