Skip to content

Commit 5faa84b

Browse files
kvladimisys_zuul
authored andcommitted
Fix system LLVM handling in CMFE
Correctly handle detection of system LLVM. Use LLVM target instead of static libraries when LLVM was configured with LLVM_LINK_LLVM_DYLIB. Change-Id: Ifed0886d6aefb79ecbdd34d0fdddd027fd2d0aaa
1 parent 167bb24 commit 5faa84b

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

IGC/CMFE/AdaptorCM/CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,16 @@ add_library(AdaptorCM STATIC
2020
InputArgsWrapper.cpp
2121
)
2222

23-
target_link_libraries(AdaptorCM
23+
vc_get_llvm_targets(LLVM_LIBS
2424
LLVMSupport
2525
)
2626

27+
message(STATUS "Linking CMFE with ${LLVM_LIBS}")
28+
29+
target_link_libraries(AdaptorCM
30+
${LLVM_LIBS}
31+
)
32+
2733
target_compile_definitions(AdaptorCM PRIVATE
2834
-DCMFE_WRAPPER_NAME=\"${INSTALL_CMFE_NAME}\")
2935

IGC/CMFE/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,7 @@ else(WIN32)
2727
endif(WIN32)
2828

2929

30+
include(${IGC_SOURCE_DIR}/cmake/utils.cmake)
31+
3032
add_subdirectory(AdaptorCM)
3133

IGC/VectorCompiler/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ add_subdirectory(${INTRSRC} ${INTRBUILD})
150150
include_directories(${INTRSRC}/include ${INTRBUILD}/include)
151151

152152
include(cmake/spirv.cmake)
153-
include(cmake/utils.cmake)
153+
include(${IGC_SOURCE_DIR}/cmake/utils.cmake)
154154

155155
# --- VC Opt ---
156156

File renamed without changes.

0 commit comments

Comments
 (0)