mirror of
https://github.com/openharmony/ability_ability_runtime.git
synced 2026-08-24 22:21:36 -04:00
f9d178ea3e
Signed-off-by: zhangzezhong <zhangzezhong8@huawei-partners.com>
182 lines
5.8 KiB
Plaintext
182 lines
5.8 KiB
Plaintext
# Copyright (c) 2021-2025 Huawei Device Co., Ltd.
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
import("//build/ohos.gni")
|
|
import("//foundation/ability/ability_runtime/ability_runtime.gni")
|
|
|
|
config("runtime_config") {
|
|
visibility = [ ":*" ]
|
|
|
|
defines = [ "AMS_LOG_TAG = \"Runtime\"" ]
|
|
defines += [ "AMS_LOG_DOMAIN = 0xD001309" ]
|
|
|
|
if (target_cpu == "arm64") {
|
|
defines += [ "_ARM64_" ]
|
|
}
|
|
|
|
if (target_cpu == "arm64") {
|
|
defines += [ "APP_USE_ARM64" ]
|
|
} else if (target_cpu == "arm") {
|
|
defines += [ "APP_USE_ARM" ]
|
|
} else if (target_cpu == "x86_64") {
|
|
defines += [ "APP_USE_X86_64" ]
|
|
}
|
|
|
|
include_dirs = []
|
|
}
|
|
|
|
config("runtime_public_config") {
|
|
visibility = [ ":*" ]
|
|
visibility += [ "${ability_runtime_napi_path}/inner/napi_common:napi_common" ]
|
|
include_dirs = [
|
|
"${ability_runtime_path}/interfaces/kits/native/ability/native/ability_business_error",
|
|
"include",
|
|
]
|
|
}
|
|
|
|
config("runtime_all_deps_config") {
|
|
include_dirs = [ "include" ]
|
|
}
|
|
|
|
ohos_shared_library("runtime") {
|
|
branch_protector_ret = "pac_ret"
|
|
|
|
include_dirs = [
|
|
"${ability_runtime_path}/ets_environment/interfaces/inner_api",
|
|
"${ability_runtime_path}/frameworks/ets/ani/ani_common/include",
|
|
"${ability_runtime_path}/services/abilitymgr/include",
|
|
"${ability_runtime_path}/interfaces/kits/native/appkit/ability_bundle_manager_helper",
|
|
"${ability_runtime_utils_path}/global/constant",
|
|
"${ability_runtime_ndk_path}/ability_runtime",
|
|
]
|
|
|
|
sources = [
|
|
"${ability_runtime_native_path}/appkit/ability_bundle_manager_helper/bundle_mgr_helper.cpp",
|
|
"${ability_runtime_native_path}/runtime/ets_native_lib_util.cpp",
|
|
"${ability_runtime_native_path}/runtime/ets_runtime.cpp",
|
|
"${ability_runtime_native_path}/runtime/hdc_register.cpp",
|
|
"${ability_runtime_native_path}/runtime/hybrid_js_module_reader.cpp",
|
|
"${ability_runtime_native_path}/runtime/js_app_process_state.cpp",
|
|
"${ability_runtime_native_path}/runtime/js_data_struct_converter.cpp",
|
|
"${ability_runtime_native_path}/runtime/js_error_utils.cpp",
|
|
"${ability_runtime_native_path}/runtime/js_module_reader.cpp",
|
|
"${ability_runtime_native_path}/runtime/js_module_searcher.cpp",
|
|
"${ability_runtime_native_path}/runtime/js_quickfix_callback.cpp",
|
|
"${ability_runtime_native_path}/runtime/js_runtime.cpp",
|
|
"${ability_runtime_native_path}/runtime/js_runtime_common.cpp",
|
|
"${ability_runtime_native_path}/runtime/js_runtime_lite.cpp",
|
|
"${ability_runtime_native_path}/runtime/js_runtime_utils.cpp",
|
|
"${ability_runtime_native_path}/runtime/js_worker.cpp",
|
|
"${ability_runtime_native_path}/runtime/native_runtime.cpp",
|
|
"${ability_runtime_native_path}/runtime/ohos_js_env_logger.cpp",
|
|
"${ability_runtime_native_path}/runtime/ohos_js_environment_impl.cpp",
|
|
"${ability_runtime_native_path}/runtime/ohos_loop_handler.cpp",
|
|
"${ability_runtime_native_path}/runtime/runtime.cpp",
|
|
]
|
|
|
|
configs = [
|
|
":runtime_config",
|
|
"${ability_runtime_services_path}/common:optimize_config",
|
|
]
|
|
|
|
public_configs = [
|
|
":runtime_public_config",
|
|
"${ability_runtime_services_path}/common:common_config",
|
|
]
|
|
|
|
deps = [
|
|
"${ability_runtime_innerkits_path}/app_manager:app_manager",
|
|
"${ability_runtime_innerkits_path}/connect_server_manager:connect_server_manager",
|
|
"${ability_runtime_native_path}/ability/native:ability_business_error",
|
|
"${ability_runtime_native_path}/appkit:appkit_manager_helper",
|
|
"${ability_runtime_path}/js_environment/frameworks/js_environment:js_environment",
|
|
"${ability_runtime_services_path}/common:app_util",
|
|
]
|
|
|
|
external_deps = [
|
|
"ability_base:configuration",
|
|
"ability_base:extractortool",
|
|
"ability_base:extractresourcemanager",
|
|
"ability_base:string_utils",
|
|
"access_token:libaccesstoken_sdk",
|
|
"bundle_framework:appexecfwk_base",
|
|
"bundle_framework:appexecfwk_core",
|
|
"bundle_framework:bundle_napi_common",
|
|
"bundle_framework:libappexecfwk_common",
|
|
"c_utils:utils",
|
|
"config_policy:configpolicy_util",
|
|
"ets_runtime:libark_jsruntime",
|
|
"ets_utils:console",
|
|
"ets_utils:timer",
|
|
"ets_utils:worker",
|
|
"eventhandler:libeventhandler",
|
|
"faultloggerd:libfaultloggerd",
|
|
"ffrt:libffrt",
|
|
"hilog:libhilog",
|
|
"hitrace:hitrace_meter",
|
|
"i18n:intl_register",
|
|
"init:syscap_ts",
|
|
"ipc:ipc_core",
|
|
"json:nlohmann_json_static",
|
|
"napi:ace_napi",
|
|
"resource_management:global_resmgr",
|
|
"runtime_core:common_interfaces_header",
|
|
"samgr:samgr_proxy",
|
|
"zlib:shared_libz",
|
|
]
|
|
|
|
public_external_deps = [
|
|
"ability_base:session_info",
|
|
"ability_base:want",
|
|
]
|
|
|
|
defines = []
|
|
|
|
if (cj_frontend) {
|
|
sources += [ "${ability_runtime_native_path}/runtime/cj_runtime.cpp" ]
|
|
|
|
include_dirs +=
|
|
[ "${ability_runtime_path}/cj_environment/interfaces/inner_api" ]
|
|
|
|
defines += [ "CJ_FRONTEND" ]
|
|
}
|
|
|
|
if (is_standard_system) {
|
|
defines += [ "ENABLE_HITRACE" ]
|
|
external_deps += [
|
|
"hitrace:libhitracechain",
|
|
"init:libbegetutil",
|
|
]
|
|
}
|
|
|
|
if (is_emulator) {
|
|
defines += [ "RUNTIME_EMULATOR" ]
|
|
}
|
|
|
|
if (ability_runtime_graphics) {
|
|
external_deps += [
|
|
"ace_engine:ace_container_scope",
|
|
"ace_engine:ace_forward_compatibility",
|
|
"ace_engine:ace_uicontent",
|
|
]
|
|
defines += [
|
|
"SUPPORT_GRAPHICS",
|
|
"SUPPORT_SCREEN",
|
|
]
|
|
}
|
|
|
|
innerapi_tags = [ "platformsdk" ]
|
|
subsystem_name = "ability"
|
|
part_name = "ability_runtime"
|
|
}
|