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:
@ -529,3 +529,19 @@ else ()
|
||||
# Disable quick aot/jit entries for interp and fast-jit
|
||||
add_definitions (-DWASM_ENABLE_QUICK_AOT_ENTRY=0)
|
||||
endif ()
|
||||
if (WAMR_BUILD_AOT EQUAL 1)
|
||||
if (NOT DEFINED WAMR_BUILD_AOT_INTRINSICS)
|
||||
# Enable aot intrinsics by default
|
||||
set (WAMR_BUILD_AOT_INTRINSICS 1)
|
||||
endif ()
|
||||
if (WAMR_BUILD_AOT_INTRINSICS EQUAL 1)
|
||||
add_definitions (-DWASM_ENABLE_AOT_INTRINSICS=1)
|
||||
message (" AOT intrinsics enabled")
|
||||
else ()
|
||||
add_definitions (-DWASM_ENABLE_AOT_INTRINSICS=0)
|
||||
message (" AOT intrinsics disabled")
|
||||
endif ()
|
||||
else ()
|
||||
# Disable aot intrinsics for interp, fast-jit and llvm-jit
|
||||
add_definitions (-DWASM_ENABLE_AOT_INTRINSICS=0)
|
||||
endif ()
|
||||
|
||||
Reference in New Issue
Block a user