Skip to content

Commit 03f982a

Browse files
committed
build: Conditionally link LIBFFI to ir_gen_test and llvm_gen_test targets.
1 parent 20d5de2 commit 03f982a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

CMakeLists.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,17 @@ if(PROX_STATIC_BUILD)
136136
if (LLVM_FOUND)
137137
target_link_libraries(ir_gen_test PRIVATE ${llvm_libs})
138138
endif()
139+
if (LIBFFI_FOUND)
140+
target_link_libraries(ir_gen_test PRIVATE ${LIBFFI_LIBRARIES})
141+
endif()
139142
else()
140143
target_link_libraries(ir_gen_test PRIVATE proxpl_lib)
141144
if (LLVM_FOUND)
142145
target_link_libraries(ir_gen_test PRIVATE ${llvm_libs})
143146
endif()
147+
if (LIBFFI_FOUND)
148+
target_link_libraries(ir_gen_test PRIVATE ${LIBFFI_LIBRARIES})
149+
endif()
144150
endif()
145151

146152
# --- LLVM Gen Test Executable ---
@@ -151,8 +157,14 @@ if(PROX_STATIC_BUILD)
151157
if (LLVM_FOUND)
152158
target_link_libraries(llvm_gen_test PRIVATE ${llvm_libs})
153159
endif()
160+
if (LIBFFI_FOUND)
161+
target_link_libraries(llvm_gen_test PRIVATE ${LIBFFI_LIBRARIES})
162+
endif()
154163
else()
155164
target_link_libraries(llvm_gen_test PRIVATE proxpl_lib ${llvm_libs})
165+
if (LIBFFI_FOUND)
166+
target_link_libraries(llvm_gen_test PRIVATE ${LIBFFI_LIBRARIES})
167+
endif()
156168
endif()
157169

158170
# --- PRM Executable ---

0 commit comments

Comments
 (0)