Skip to content

Commit 9773390

Browse files
authored
set default value of WAMR_BUILD_REF_TYPES to 1 in standalone cases (#4227)
- set default value of WAMR_BUILD_REF_TYPES to 1 in CMakeLists.txt
1 parent a996689 commit 9773390

File tree

5 files changed

+16
-4
lines changed

5 files changed

+16
-4
lines changed

tests/standalone/test-invoke-native/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,11 @@ if (NOT DEFINED WAMR_BUILD_SIMD)
8888
set (WAMR_BUILD_SIMD 0)
8989
endif ()
9090

91+
if (NOT DEFINED WAMR_BUILD_REF_TYPES)
92+
# Enable reference types by default
93+
set (WAMR_BUILD_REF_TYPES 1)
94+
endif ()
95+
9196
set (WAMR_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../..)
9297

9398
include (${WAMR_ROOT_DIR}/build-scripts/runtime_lib.cmake)

tests/standalone/test-module-malloc/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ endif ()
4848
if (NOT WAMR_BUILD_AOT)
4949
set (WAMR_BUILD_AOT 1)
5050
endif ()
51+
if (NOT WAMR_BUILD_REF_TYPES)
52+
set (WAMR_BUILD_REF_TYPES 1)
53+
endif ()
5154
set (WAMR_BUILD_LIBC_BUILTIN 1)
5255
set (WAMR_BUILD_LIBC_WASI 1)
5356

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,3 @@ else
5555
./iwasm --native-lib=./libtest_module_malloc.so wasm-app/test.aot
5656
fi
5757
fi
58-

tests/standalone/test-pthread/threads-opcode-wasm-apps/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
cmake_minimum_required(VERSION 3.14)
55
project(wasm-apps)
66

7-
set(WAMR_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../../wamr)
7+
set(WAMR_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../..)
88

99
if (APPLE)
1010
set (HAVE_FLAG_SEARCH_PATHS_FIRST 0)

tests/standalone/test-running-modes/c-embed/CMakeLists.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
project(c_embed_test)
15-
1614
cmake_minimum_required(VERSION 3.14)
1715

16+
project(c_embed_test)
17+
1818
include(CheckPIESupported)
1919

2020
string (TOLOWER ${CMAKE_HOST_SYSTEM_NAME} WAMR_BUILD_PLATFORM)
@@ -34,6 +34,11 @@ set(WAMR_BUILD_LIBC_WASI 1)
3434
set(WAMR_BUILD_SIMD 1)
3535
set(WAMR_ROOT_DIR ${CMAKE_CURRENT_LIST_DIR}/../../../..)
3636

37+
if (NOT DEFINED WAMR_BUILD_REF_TYPES)
38+
# Enable reference types by default
39+
set (WAMR_BUILD_REF_TYPES 1)
40+
endif ()
41+
3742
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}")
3843
if (NOT WAMR_BUILD_PLATFORM STREQUAL "darwin")
3944
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections -pie -fPIE")

0 commit comments

Comments
 (0)