Skip to content

Commit 4cfdfee

Browse files
cosmo0920edsiper
authored andcommitted
build: flb-wamrc: Build flb-wamrc with LLVM 13.0 or later
Signed-off-by: Hiroshi Hatake <[email protected]>
1 parent b3c5cda commit 4cfdfee

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/wamrc/CMakeLists.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,14 @@ else()
123123
endif()
124124

125125
find_package(LLVM CONFIG)
126+
if (LLVM_FOUND)
127+
if (LLVM_PACKAGE_VERSION VERSION_LESS 13.0)
128+
message(STATUS "Outdated LLVM ${LLVM_PACKAGE_VERSION} is found. WAMRC won't be built.")
129+
set(LLVM_FOUND 0)
130+
endif()
131+
else()
132+
message(STATUS "LLVM is not found. WAMRC won't be built.")
133+
endif()
126134
if (LLVM_FOUND)
127135
include_directories(${LLVM_INCLUDE_DIRS})
128136
add_definitions(${LLVM_DEFINITIONS})
@@ -199,6 +207,4 @@ if (LLVM_FOUND)
199207
install(FILES $<TARGET_PDB_FILE:flb-wamrc-bin>
200208
DESTINATION "${FLB_INSTALL_BINDIR}")
201209
endif()
202-
else()
203-
message(STATUS "LLVM is not found. WAMRC won't be built.")
204210
endif ()

0 commit comments

Comments
 (0)