Skip to content

Commit bfb0433

Browse files
committed
fix test
1 parent 4d1f905 commit bfb0433

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

enzyme/Enzyme/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,13 +162,18 @@ if (${ENZYME_EXTERNAL_SHARED_LIB})
162162
execute_process(COMMAND ${LLVM_TOOLS_BINARY_DIR}/llvm-config --libs all
163163
OUTPUT_VARIABLE llvm_libraries)
164164
string(STRIP "${llvm_libraries}" llvm_libraries)
165+
message(STATUS "Linking against LLVM libraries: ${llvm_libraries}")
165166
# In theory, adding --libs should also add all the -l flags,
166167
# but it isn't picked up correctly by clang, so we call target_link_libraries
167168
execute_process(COMMAND ${LLVM_TOOLS_BINARY_DIR}/llvm-config --ldflags
168169
OUTPUT_VARIABLE llvm_ldflags)
169170
string(STRIP "${llvm_ldflags}" llvm_ldflags)
171+
message(STATUS "Linking against LLVM ldflags: ${llvm_ldflags}")
170172
set_target_properties(Enzyme-${LLVM_VERSION_MAJOR} PROPERTIES LINK_FLAGS ${llvm_ldflags})
171173
target_link_libraries(Enzyme-${LLVM_VERSION_MAJOR} PRIVATE ${llvm_libraries})
174+
175+
llvm_map_components_to_libnames(llvm_librariess Passes Support)
176+
target_link_libraries(Enzyme-${LLVM_VERSION_MAJOR} PRIVATE ${llvm_librariess})
172177
endif()
173178
install(TARGETS Enzyme-${LLVM_VERSION_MAJOR}
174179
EXPORT EnzymeTargets

0 commit comments

Comments
 (0)