Expose WAMR_BUILD_GC_HEAP_SIZE_DEFAULT as a CMake option

This is wired through to the GC_HEAP_SIZE_DEFAULT constant.

Also honor this value when configuring the engine with the
wasm_c_api.
This commit is contained in:
Jesse Wilson
2025-03-02 23:32:04 -05:00
parent ff10b86938
commit beb34c3675
2 changed files with 5 additions and 0 deletions

View File

@ -24,6 +24,10 @@ if (WAMR_BUILD_GC_CORRUPTION_CHECK EQUAL 0)
add_definitions (-DBH_ENABLE_GC_CORRUPTION_CHECK=0)
endif ()
if (DEFINED WAMR_BUILD_GC_HEAP_SIZE_DEFAULT)
add_definitions ("-DGC_HEAP_SIZE_DEFAULT=${WAMR_BUILD_GC_HEAP_SIZE_DEFAULT}")
endif ()
file (GLOB_RECURSE source_all
${MEM_ALLOC_DIR}/ems/*.c
${MEM_ALLOC_DIR}/tlsf/*.c