Skip to content

Commit 040e776

Browse files
authored
top-level cmake: link llvm libraries to our shared library (#3973)
This fixes link errors seen on my environment. (macOS 15.2, x86-64, Xcode 16.2) Tested as: ``` mkdir b cd b cmake -D WAMR_BUILD_JIT=1 -D LLVM_DIR=/usr/local/opt/llvm@19/lib/cmake/llvm .. make ```
1 parent 4cda74a commit 040e776

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ if (WAMR_BUILD_SHARED)
182182
add_library (iwasm_shared SHARED ${WAMR_RUNTIME_LIB_SOURCE})
183183
set_target_properties (iwasm_shared PROPERTIES OUTPUT_NAME iwasm)
184184
target_include_directories(iwasm_shared INTERFACE ${WAMR_ROOT_DIR}/core/iwasm/include)
185-
target_link_libraries (iwasm_shared INTERFACE ${LLVM_AVAILABLE_LIBS} ${UV_A_LIBS} -lm -ldl ${CMAKE_THREAD_LIBS_INIT})
185+
target_link_libraries (iwasm_shared PUBLIC ${LLVM_AVAILABLE_LIBS} ${UV_A_LIBS} -lm -ldl ${CMAKE_THREAD_LIBS_INIT})
186186
if (WAMR_BUILD_WASM_CACHE EQUAL 1)
187187
target_link_libraries(iwasm_shared INTERFACE boringssl_crypto)
188188
endif ()

0 commit comments

Comments
 (0)