wasm-micro-runtime icon indicating copy to clipboard operation
wasm-micro-runtime copied to clipboard

Unable to compile JIT mode using arm-none-eabi-gcc compiler

Open BForever opened this issue 3 years ago • 1 comments

I am trying to port WAMR to a stm32f767 development board. Both interpreter and AOT modes can be compiled, but the JIT mode has encountered a problem. The thread model of the arm-none-eabi-gcc compiler is "single", so there is no <mutex> header file, here's some prompt: wamr/core/deps/llvm/llvm/include/llvm/Support/Mutex.h:18:1: note: 'std::recursive_mutex' is defined in header '<mutex>'; did you forget to '#include <mutex>'?

wamr/core/deps/llvm/llvm/include/llvm/Support/RWMutex.h:21:1: note: 'std::shared_timed_mutex' is defined in header '<shared_mutex>'; did you forget to '#include <shared_mutex>'?

wamr/core/deps/llvm/llvm/include/llvm/Support/Threading.h:46:1: note: 'std::once_flag' is defined in header '<mutex>'; did you forget to '#include <mutex>'? 45 | #include <mutex> +++ |+#include <mutex> 46 | #else

Is there any way to bypass this restriction? How can I compile WAMR with JIT mode using a "single" thread model compiler?

BForever avatar Sep 27 '21 03:09 BForever

Hi, in JIT mode, we need to link LLVM library into WAMR runtime. However, I looked through the datasheet of STM32F767, this chip has only 2M Flash and 512K SRAM, I don't think it's possible to run LLVM on it.

xujuntwt95329 avatar Sep 29 '21 06:09 xujuntwt95329