Skip to content

Commit 41850b6

Browse files
committed
set default value of WAMR_BUILD_REF_TYPES to 1
1 parent 6593b3f commit 41850b6

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

build-scripts/config_common.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,10 @@ if (NOT DEFINED WAMR_BUILD_TAIL_CALL)
211211
set (WAMR_BUILD_TAIL_CALL 0)
212212
endif ()
213213

214+
if (NOT DEFINED WAMR_BUILD_REF_TYPES)
215+
set (WAMR_BUILD_REF_TYPES 1)
216+
endif ()
217+
214218
########################################
215219
# Compilation options to marco
216220
########################################

tests/standalone/test-module-malloc/run.sh

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,31 +28,30 @@ echo "============> test test-module-malloc"
2828

2929
if [[ $1 != "--aot" ]]; then
3030
rm -fr build && mkdir build && cd build
31-
cmake .. -DWAMR_BUILD_TARGET=${TARGET}
31+
cmake .. -DWAMR_BUILD_TARGET=${TARGET} -DWAMR_BUILD_REF_TYPES=1
3232
make -j > /dev/null 2>&1
3333
./iwasm --native-lib=./libtest_module_malloc.so wasm-app/test.wasm
3434
if [ ${TARGET} == "X86_64" ]; then
3535
echo "============> test test-module-malloc with hw bound check disabled"
3636
cd .. && rm -fr build && mkdir build && cd build
37-
cmake .. -DWAMR_BUILD_TARGET=${TARGET} -DWAMR_DISABLE_HW_BOUND_CHECK=1
37+
cmake .. -DWAMR_BUILD_TARGET=${TARGET} -DWAMR_BUILD_REF_TYPES=1 -DWAMR_DISABLE_HW_BOUND_CHECK=1
3838
make clean
3939
make -j > /dev/null 2>&1
4040
./iwasm --native-lib=./libtest_module_malloc.so wasm-app/test.wasm
4141
fi
4242
else
4343
rm -fr build && mkdir build && cd build
44-
cmake .. -DWAMR_BUILD_TARGET=${TARGET}
44+
cmake .. -DWAMR_BUILD_TARGET=${TARGET} -DWAMR_BUILD_REF_TYPES=1
4545
make -j > /dev/null 2>&1
4646
${WAMRC_CMD} ${WAMRC_FLAGS} -o wasm-app/test.aot wasm-app/test.wasm
4747
./iwasm --native-lib=./libtest_module_malloc.so wasm-app/test.aot
4848
if [ ${TARGET} == "X86_64" ]; then
4949
echo "============> test test-module-malloc with hw bound check disabled"
5050
cd .. && rm -fr build && mkdir build && cd build
51-
cmake .. -DWAMR_BUILD_TARGET=${TARGET} -DWAMR_DISABLE_HW_BOUND_CHECK=1
51+
cmake .. -DWAMR_BUILD_TARGET=${TARGET} -DWAMR_BUILD_REF_TYPES=1 -DWAMR_DISABLE_HW_BOUND_CHECK=1
5252
make clean
5353
make -j > /dev/null 2>&1
5454
${WAMRC_CMD} ${WAMRC_FLAGS} --bounds-checks=1 -o wasm-app/test.aot wasm-app/test.wasm
5555
./iwasm --native-lib=./libtest_module_malloc.so wasm-app/test.aot
5656
fi
5757
fi
58-

0 commit comments

Comments
 (0)