diff --git a/BUILD.gn b/BUILD.gn index c1f2b9240295d848bd26f2cb3093d11d0dbcb482..4a8c15602eefbde15cf9d6fa4c76551e81af4b5d 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -265,15 +265,6 @@ config("ark_jsruntime_public_config") { defines += [ "PANDA_JS_ETS_HYBRID_MODE" ] configs += [ "$ark_root/arkplatform:arkplatform_public_config" ] } - - if (ark_hybrid) { - defines += [ "ARK_HYBRID" ] - - if (current_cpu == "amd64" || current_cpu == "x64" || - current_cpu == "x86_64") { - ldflags += [ "-latomic" ] - } - } } intl_sources = [] @@ -1417,9 +1408,6 @@ ohos_source_set("libark_jsruntime_test_set") { if (ets_runtime_enable_cmc_gc) { deps += [ ":libcommon_components_set" ] - if (ark_hybrid) { - deps += [ "$ark_root/static_core/runtime:libarkruntime_set_static" ] - } } public_configs = [ "$js_root:ark_jsruntime_public_config" ] @@ -1466,9 +1454,6 @@ ohos_source_set("libark_jsruntime_static") { if (ets_runtime_enable_cmc_gc) { deps += [ ":libcommon_components_set" ] - if (ark_hybrid) { - deps += [ "$ark_root/static_core/runtime:libarkruntime_set_static" ] - } } external_deps = [] @@ -1515,6 +1500,58 @@ config("arkjs_runtime_lto_link_config") { } } +ohos_static_library("libark_jsruntime_static_lib") { + stack_protector_ret = false + if (enable_sanitize) { + sanitize = { + ubsan = true + } + } + + deps = [ ":libark_jsruntime_static" ] + + external_deps = [] + if (is_arkui_x && target_os == "ios") { + deps += [ "$ark_third_party_root/bounds_checking_function:libsec_static" ] + } else { + external_deps += [ "bounds_checking_function:libsec_shared" ] + } + + if (!is_arkui_x) { + external_deps += [ "runtime_core:libarkfile_runtime_static" ] + } else { + deps += [ "$ark_root/libpandafile:libarkfile_runtime_static" ] + } + + # hiviewdfx libraries + external_deps += hiviewdfx_ext_deps + deps += hiviewdfx_deps + + if (!enable_ark_intl) { + external_deps += [ "i18n:intl_util" ] + } + + if (ark_standalone_build || (defined(is_arkui_x) && is_arkui_x)) { + deps += [ + "$ark_third_party_root/icu/icu4c:static_icui18n", + "$ark_third_party_root/icu/icu4c:static_icuuc", + ] + } else { + public_external_deps = [ + "icu:shared_icui18n", + "icu:shared_icuuc", + ] + } + + part_name = "ets_runtime" + subsystem_name = "arkcompiler" + + configs = [ + ":ark_jsruntime_common_config", + ":arkjs_runtime_lto_link_config", + ] +} + ohos_shared_library("libark_jsruntime") { stack_protector_ret = false if (enable_sanitize) { diff --git a/bundle.json b/bundle.json index 074ebe5125320de19e3fe6bfb2cd434c3c1c39a2..a1a52cc05005f8852d861617db8ad27a637b6116 100644 --- a/bundle.json +++ b/bundle.json @@ -80,6 +80,9 @@ "header_base": "//arkcompiler/ets_runtime/ecmascript/napi/include" } }, + { + "name": "//arkcompiler/ets_runtime:libark_jsruntime_static_lib" + }, { "name": "//arkcompiler/ets_runtime:libark_jsruntime_static", "header": { diff --git a/ecmascript/compiler/BUILD.gn b/ecmascript/compiler/BUILD.gn index 7b996a74d8e28d06209572f3342397f6a857fb00..165dd6c09768d3909c708f90d17fae0ced822790 100644 --- a/ecmascript/compiler/BUILD.gn +++ b/ecmascript/compiler/BUILD.gn @@ -411,9 +411,6 @@ ohos_executable("ark_stub_compiler") { if (ets_runtime_enable_cmc_gc) { deps += [ "$js_root:libcommon_components_set" ] - if (ark_hybrid) { - deps += [ "$ark_root/static_core/runtime:libarkruntime_set_static" ] - } } external_deps = [ "zlib:libz" ] @@ -480,9 +477,6 @@ ohos_executable("ark_aot_compiler") { if (ets_runtime_enable_cmc_gc) { deps += [ "$js_root:libcommon_components_set" ] - if (ark_hybrid) { - deps += [ "$ark_root/static_core/runtime:libarkruntime_set_static" ] - } } external_deps = [ "zlib:libz" ] diff --git a/ecmascript/pgo_profiler/prof_dump/BUILD.gn b/ecmascript/pgo_profiler/prof_dump/BUILD.gn index 635849e05bded58ecae71a478b14a15115a25612..b09660826c9f29e01e9430116713aa8c39018988 100644 --- a/ecmascript/pgo_profiler/prof_dump/BUILD.gn +++ b/ecmascript/pgo_profiler/prof_dump/BUILD.gn @@ -55,9 +55,6 @@ ohos_executable("profdump") { if (ets_runtime_enable_cmc_gc) { deps += [ "$js_root:libcommon_components_set" ] - if (ark_hybrid) { - deps += [ "$ark_root/static_core/runtime:libarkruntime_set_static" ] - } } # hiviewdfx libraries diff --git a/js_runtime_config.gni b/js_runtime_config.gni index 3490be649888e7226c0d2b95dec32540aee3116e..81b8604443c6eeb8d666b603f118614b8089c3d6 100644 --- a/js_runtime_config.gni +++ b/js_runtime_config.gni @@ -15,10 +15,6 @@ if (!defined(ark_standalone_build)) { ark_standalone_build = false } -if (!defined(ark_hybrid)) { - ark_hybrid = false -} - declare_args() { # If true, use icu to implement Intl APIs. # If false, use @ohos.intl APIs to implement Intl APIs.