Explorar o código

Fix compile error when build target X86_32 (#869)

Fix compile error introduced by #866.
Wenyong Huang %!s(int64=4) %!d(string=hai) anos
pai
achega
a5193686f5
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      build-scripts/config_common.cmake

+ 2 - 2
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")