Skip to content

Commit

Permalink
fall back to 'LLVM' target if LLVM-C is unavailable
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugobros3 committed Jan 17, 2024
1 parent aa92c82 commit 50aae65
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/frontends/llvm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ target_compile_definitions(shady_fe_llvm PRIVATE "LLVM_VERSION_MAJOR=${LLVM_VERS
if (TARGET LLVM-C)
message("LLVM-C shared library target exists, major version = ${LLVM_VERSION_MAJOR}")
target_link_libraries(shady_fe_llvm PRIVATE LLVM-C)
elseif (TARGET LLVM)
message("LLVM shared library target exists, major version = ${LLVM_VERSION_MAJOR}")
target_link_libraries(shady_fe_llvm PRIVATE LLVM)
else ()
message(FATAL_ERROR "Failed to find LLVM-C target, but found LLVM module earlier")
message(FATAL_ERROR "Failed to find LLVM-C target, but found LLVM module earlier")
endif()

target_link_libraries(shady_fe_llvm PRIVATE api common shady)
Expand Down

0 comments on commit 50aae65

Please sign in to comment.