diff --git a/wamr-compiler/CMakeLists.txt b/wamr-compiler/CMakeLists.txt index 6a3f975210..23a2e41627 100644 --- a/wamr-compiler/CMakeLists.txt +++ b/wamr-compiler/CMakeLists.txt @@ -387,6 +387,8 @@ if (NOT MSVC) target_link_libraries (wamrc ssp.a ws2_32) else() target_link_libraries (wamrc -ldl) + # Link libc++ statically to reduce the runtime dependency + target_link_libraries (wamrc -static-libstdc++) endif() else() target_link_libraries (wamrc aotclib vmlib ${lib_lldb} ${WAMRC_LINK_LLVM_LIBS} ${lib_ubsan}