From a5193686f5836a882e71f7a29bb5faa7b8770d23 Mon Sep 17 00:00:00 2001 From: Wenyong Huang Date: Mon, 6 Dec 2021 19:01:09 +0800 Subject: [PATCH] Fix compile error when build target X86_32 (#869) Fix compile error introduced by #866. --- build-scripts/config_common.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build-scripts/config_common.cmake b/build-scripts/config_common.cmake index c60725d4..02ae865c 100644 --- a/build-scripts/config_common.cmake +++ b/build-scripts/config_common.cmake @@ -62,8 +62,8 @@ if (CMAKE_SIZEOF_VOID_P EQUAL 8) endif () else () include(CheckCCompilerFlag) - Check_C_Compiler_Flag( -m32 M32_OK ) - if (M32_OK) + Check_C_Compiler_Flag(-m32 M32_OK) + if (M32_OK OR WAMR_BUILD_TARGET STREQUAL "X86_32") add_definitions (-m32) set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -m32") set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -m32")