From 6fb376cbe3252cbdf5b7b47df417e55e5a1bc1d5 Mon Sep 17 00:00:00 2001 From: Wenyong Huang Date: Wed, 17 Jan 2024 16:17:08 +0800 Subject: [PATCH] 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. --- build-scripts/config_common.cmake | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/build-scripts/config_common.cmake b/build-scripts/config_common.cmake index b9d5a0413..5d710b2e1 100644 --- a/build-scripts/config_common.cmake +++ b/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})