Add cmake flag to control aot intrinsics (#3261)

Add cmake variable `-DWAMR_BUILD_AOT_INTRINSICS=1/0` to enable/disable
the aot intrinsic functions, which are normally used by AOT XIP feature, and
can be disabled to reduce the aot runtime binary size.

And refactor the code in aot_intrinsics.h/.c.
This commit is contained in:
Wenyong Huang
2024-04-01 11:26:05 +08:00
committed by GitHub
parent b9740beb31
commit 9c8551cf75
6 changed files with 116 additions and 84 deletions

View File

@ -570,6 +570,14 @@
#define WASM_ENABLE_QUICK_AOT_ENTRY 1
#endif
/* Support AOT intrinsic functions which can be called from the AOT code
when `--disable-llvm-intrinsics` flag or
`--enable-builtin-intrinsics=<intr1,intr2,...>` is used by wamrc to
generate the AOT file */
#ifndef WASM_ENABLE_AOT_INTRINSICS
#define WASM_ENABLE_AOT_INTRINSICS 1
#endif
#ifndef WASM_TABLE_MAX_SIZE
#define WASM_TABLE_MAX_SIZE 1024
#endif