build: wamrc: Make LLVM as optional for building dependencies
@@ -92,7 +92,8 @@ if (NOT WAMR_BUILD_WITH_SYSTEM_LLVM)
endif ()
endif ()
-find_package(LLVM REQUIRED CONFIG)
+find_package(LLVM CONFIG)
+if (LLVM_FOUND)
include_directories(${LLVM_INCLUDE_DIRS})
add_definitions(${LLVM_DEFINITIONS})
@@ -168,3 +169,6 @@ if (MSVC)
install(FILES $<TARGET_PDB_FILE:flb-wamrc-bin>
DESTINATION "${FLB_INSTALL_BINDIR}")
endif()
+else()
+ message(STATUS "LLVM is not found. WAMRC won't be built.")
+endif ()
\ No newline at end of file
