# # Copyright (c) 2024 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") group("ams_common_target") { deps = [ ":event_report", ":perm_verification", ":task_handler_wrap", ] } config("common_config") { visibility = [ ":*" ] visibility += [ "${ability_runtime_innerkits_path}/*", "${ability_runtime_napi_path}/*", "${ability_runtime_native_path}/ability/native/*", "${ability_runtime_native_path}/child_process/*", "${ability_runtime_path}/frameworks/c/ability_runtime/*", "${ability_runtime_path}/frameworks/simulator/ability_simulator/*", "${ability_runtime_path}/tools/aa/*", "${ability_runtime_services_path}/common/*", "${ability_runtime_services_path}/quickfixmgr/*", "${ability_runtime_services_path}/uripermmgr/*", "${ability_runtime_test_path}/*", "${hiebpf_path}/*", "${power_manager_path}/utils/*", "${request_path}/common/*", ] include_dirs = [ "include", "${ability_runtime_innerkits_path}/ability_manager/include", ] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] } } #build so ohos_shared_library("perm_verification") { branch_protector_ret = "pac_ret" include_dirs = [ "${ability_runtime_utils_path}/server/constant" ] public_configs = [ ":common_config" ] sources = [ "src/permission_verification.cpp" ] external_deps = [ "ability_base:want", "access_token:libaccesstoken_sdk", "access_token:libtokenid_sdk", "c_utils:utils", "hilog:libhilog", "hitrace:hitrace_meter", "init:libbegetutil", "ipc:ipc_core", ] cflags_cc = [] if (os_dlp_part_enabled) { cflags_cc += [ "-DWITH_DLP" ] } subsystem_name = "ability" innerapi_tags = [ "platformsdk_indirect" ] part_name = "ability_runtime" } ohos_shared_library("event_report") { branch_protector_ret = "pac_ret" public_configs = [ ":common_config" ] sources = [ "src/event_report.cpp" ] external_deps = [ "hilog:libhilog", "hisysevent:libhisysevent", "hitrace:hitrace_meter", ] innerapi_tags = [ "platformsdk_indirect" ] subsystem_name = "ability" part_name = "ability_runtime" } ohos_shared_library("task_handler_wrap") { branch_protector_ret = "pac_ret" public_configs = [ ":common_config" ] include_dirs = [ "include" ] sources = [ "src/event_handler_wrap.cpp", "src/ffrt_task_handler_wrap.cpp", "src/queue_task_handler_wrap.cpp", "src/task_handler_wrap.cpp", ] external_deps = [ "ffrt:libffrt", "hilog:libhilog", ] subsystem_name = "ability" part_name = "ability_runtime" } ohos_shared_library("app_util") { branch_protector_ret = "pac_ret" public_configs = [ ":common_config" ] include_dirs = [ "include" ] sources = [ "src/ability_manager_radar.cpp", "src/app_utils.cpp", "src/json_utils.cpp", ] external_deps = [ "config_policy:configpolicy_util", "hilog:libhilog", "hisysevent:libhisysevent", "init:libbegetutil", "json:nlohmann_json_static", ] if (ability_runtime_graphics) { defines = [ "SUPPORT_GRAPHICS" ] external_deps += [ "window_manager:libwsutils" ] } subsystem_name = "ability" part_name = "ability_runtime" } ohos_shared_library("res_sched_util") { sanitize = { integer_overflow = true ubsan = true boundary_sanitize = true cfi = true cfi_cross_dso = true debug = false } branch_protector_ret = "pac_ret" public_configs = [ ":common_config" ] include_dirs = [ "include" ] sources = [ "src/res_sched_util.cpp" ] external_deps = [ "bundle_framework:appexecfwk_base", "hilog:libhilog", ] if (resource_schedule_service_enable) { defines = [ "RESOURCE_SCHEDULE_SERVICE_ENABLE" ] external_deps += [ "resource_schedule_service:ressched_client" ] } subsystem_name = "ability" part_name = "ability_runtime" }