diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn index ef04571502bb452514620602e88c6c393039df21..18681b4e5e1d43f3397a1549e4448514167f24ce 100644 --- a/build/config/BUILDCONFIG.gn +++ b/build/config/BUILDCONFIG.gn @@ -13,6 +13,7 @@ declare_args() { ark_standalone_build = true ark_use_cmc_gc = false + ark_hybrid = false use_musl = true build_root = "//arkcompiler/toolchain/build" run_with_qemu = false diff --git a/build/core/gn/BUILD.gn b/build/core/gn/BUILD.gn index 43fe962baa10df0d087ea0d68b0feb20dd94e362..99c30b2a510ecd8c4e11f3c9c8bbcd3f9e9a5076 100644 --- a/build/core/gn/BUILD.gn +++ b/build/core/gn/BUILD.gn @@ -101,11 +101,7 @@ group("static_core") { deps += [ "$ark_root/static_core/static_linker:static_linker" ] } if (target_os != "mingw" && target_os != "mac") { - if (ark_use_cmc_gc) { - deps += [ "$js_root:libark_jsruntime" ] - } else { - deps += [ "$ark_root/static_core/runtime:libarkruntime" ] - } + deps += [ "$ark_root/static_core/runtime:libarkruntime" ] } } @@ -113,6 +109,7 @@ group("hybrid") { deps = [ ":ets_frontend", ":ets_runtime", + ":static_core", "$ark_root/static_core/plugins/ets:etsstdlib(${host_toolchain})", ] if (target_os != "mingw" && target_os != "mac") { @@ -122,10 +119,6 @@ group("hybrid") { "$ark_root/static_core/tools/ark_js_napi_cli:ark_js_napi_cli", ] } - - if (!ark_use_cmc_gc) { - deps += [ ":static_core" ] - } } group("toolchain") { diff --git a/tooling/BUILD.gn b/tooling/BUILD.gn index e345de6736b0cf02ecf9330c0a0911f60a698337..4b3cacdcd1f6f1914e2ad7cd2735146b30be5fce 100644 --- a/tooling/BUILD.gn +++ b/tooling/BUILD.gn @@ -60,7 +60,12 @@ ohos_source_set("libark_ecma_debugger_set") { defines = [] deps = [] - external_deps = [ "ets_runtime:libark_jsruntime" ] + external_deps = [] + if (defined(ark_hybrid) && ark_hybrid) { + external_deps += [ "runtime_core:libarkruntime" ] + } else { + external_deps += [ "ets_runtime:libark_jsruntime" ] + } if (is_arkui_x && target_os == "ios") { sources -= [ "../common/log_wrapper.cpp" ] external_deps += [ "cJSON:cjson_static" ] @@ -112,9 +117,17 @@ ohos_shared_library("libark_ecma_debugger") { external_deps += [ "hilog:libhilog" ] } if (!is_arkui_x) { - external_deps += [ "ets_runtime:libark_jsruntime" ] + if (defined(ark_hybrid) && ark_hybrid) { + external_deps += [ "runtime_core:libarkruntime" ] + } else { + external_deps += [ "ets_runtime:libark_jsruntime" ] + } } else { - deps += [ "../../ets_runtime:libark_jsruntime" ] + if (defined(ark_hybrid) && ark_hybrid) { + deps += [ "../../runtime_core:libarkruntime" ] + } else { + deps += [ "../../ets_runtime:libark_jsruntime" ] + } } deps += hiviewdfx_deps @@ -140,10 +153,14 @@ ohos_static_library("libark_ecma_debugger_test") { defines = [ "OHOS_UNIT_TEST" ] deps = [] external_deps = [ - "ets_runtime:libark_jsruntime", "icu:shared_icuuc", "libuv:uv", ] + if (defined(ark_hybrid) && ark_hybrid) { + external_deps += [ "runtime_core:libarkruntime" ] + } else { + external_deps += [ "ets_runtime:libark_jsruntime" ] + } if ((is_arkui_x && target_os == "ios") || target_os == "mac") { external_deps += [ "cJSON:cjson_static" ] } else { diff --git a/tooling/client/BUILD.gn b/tooling/client/BUILD.gn index 21c40e9b9c7775e85470f6e40529f5e74992e0da..c41d697984c20d799ebe5ffef37bf7ad7d361e98 100644 --- a/tooling/client/BUILD.gn +++ b/tooling/client/BUILD.gn @@ -53,11 +53,16 @@ ohos_source_set("libark_client_set") { external_deps += [ "bounds_checking_function:libsec_shared", "cJSON:cjson_static", - "ets_runtime:libark_jsruntime", "icu:shared_icuuc", "libuv:uv", ] + if (defined(ark_hybrid) && ark_hybrid) { + external_deps += [ "runtime_core:libarkruntime" ] + } else { + external_deps += [ "ets_runtime:libark_jsruntime" ] + } + configs = [ "../..:ark_toolchain_common_config" ] cflags_cc = [ "-Wno-vla-extension" ] diff --git a/tooling/client/ark_cli/BUILD.gn b/tooling/client/ark_cli/BUILD.gn index 73f753d57a9d85b394064f3717f1b0d67c5640db..b54b2a3c2665c808d282740c92d312ee7aac4470 100644 --- a/tooling/client/ark_cli/BUILD.gn +++ b/tooling/client/ark_cli/BUILD.gn @@ -31,11 +31,16 @@ ohos_executable("arkdb") { external_deps = [ "bounds_checking_function:libsec_shared", "cJSON:cjson", - "ets_runtime:libark_jsruntime", "icu:shared_icuuc", "libuv:uv", ] + if (defined(ark_hybrid) && ark_hybrid) { + external_deps += [ "runtime_core:libarkruntime" ] + } else { + external_deps += [ "ets_runtime:libark_jsruntime" ] + } + # hiviewdfx libraries external_deps += hiviewdfx_ext_deps deps += hiviewdfx_deps diff --git a/tooling/client/ark_multi/BUILD.gn b/tooling/client/ark_multi/BUILD.gn index 439049c3a9fecc2bc8f4cc7eff72198a0712c91d..62d885e65cf7d1babab2f8f485234e6962bac006 100644 --- a/tooling/client/ark_multi/BUILD.gn +++ b/tooling/client/ark_multi/BUILD.gn @@ -31,10 +31,14 @@ ohos_executable("ark_multi") { external_deps = [ "bounds_checking_function:libsec_shared", - "ets_runtime:libark_jsruntime", "icu:shared_icuuc", "libuv:uv", ] + if (defined(ark_hybrid) && ark_hybrid) { + external_deps += [ "runtime_core:libarkruntime" ] + } else { + external_deps += [ "ets_runtime:libark_jsruntime" ] + } # hiviewdfx libraries external_deps += hiviewdfx_ext_deps