Просмотр исходного кода

Disable quick aot entry for interp and fast-jit (#3039)

Quick aot/jit entry is only for aot and llvm jit now, no need to enable it
for interpreter and fast-jit when aot and llvm jit are disabled.
Wenyong Huang 2 лет назад
Родитель
Сommit
6fb376cbe3
1 измененных файлов с 13 добавлено и 9 удалено
  1. 13 9
      build-scripts/config_common.cmake

+ 13 - 9
build-scripts/config_common.cmake

@@ -457,18 +457,22 @@ if (WAMR_BUILD_LINUX_PERF EQUAL 1)
   add_definitions (-DWASM_ENABLE_LINUX_PERF=1)
   message ("     Linux perf support enabled")
 endif ()
-if (NOT DEFINED WAMR_BUILD_QUICK_AOT_ENTRY)
-  # Enable quick aot/jit entries by default
-  set (WAMR_BUILD_QUICK_AOT_ENTRY 1)
-endif ()
-if (WAMR_BUILD_QUICK_AOT_ENTRY EQUAL 1)
-  add_definitions (-DWASM_ENABLE_QUICK_AOT_ENTRY=1)
-  message ("     Quick AOT/JIT entries enabled")
+if (WAMR_BUILD_AOT EQUAL 1 OR WAMR_BUILD_JIT EQUAL 1)
+  if (NOT DEFINED WAMR_BUILD_QUICK_AOT_ENTRY)
+    # Enable quick aot/jit entries by default
+    set (WAMR_BUILD_QUICK_AOT_ENTRY 1)
+  endif ()
+  if (WAMR_BUILD_QUICK_AOT_ENTRY EQUAL 1)
+    add_definitions (-DWASM_ENABLE_QUICK_AOT_ENTRY=1)
+    message ("     Quick AOT/JIT entries enabled")
+  else ()
+    add_definitions (-DWASM_ENABLE_QUICK_AOT_ENTRY=0)
+    message ("     Quick AOT/JIT entries disabled")
+  endif ()
 else ()
+  # Disable quick aot/jit entries for interp and fast-jit
   add_definitions (-DWASM_ENABLE_QUICK_AOT_ENTRY=0)
-  message ("     Quick AOT/JIT entries disabled")
 endif ()
-
 if (APPLE)
   EXEC_PROGRAM(sw_vers ARGS -productVersion OUTPUT_VARIABLE OS_X_VERSION)
   STRING(REGEX MATCH "([0-9]+)" OS_X_VERSION ${OS_X_VERSION})