Przeglądaj źródła

Fix compile error when build target X86_32 (#869)

Fix compile error introduced by #866.
Wenyong Huang 4 lat temu
rodzic
commit
a5193686f5
1 zmienionych plików z 2 dodań i 2 usunięć
  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")