1# Copyright (c) 2025 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14import("//build/ohos.gni") 15import("//foundation/ability/ability_runtime/ability_runtime.gni") 16 17config("ani_common_public_config") { 18 visibility = [ ":*" ] 19 include_dirs = [ "include" ] 20} 21 22ohos_shared_library("ani_common") { 23 branch_protector_ret = "pac_ret" 24 sanitize = { 25 cfi = true 26 cfi_cross_dso = true 27 cfi_vcall_icall_only = true 28 debug = false 29 } 30 31 include_dirs = [ 32 "./include", 33 "${ability_runtime_innerkits_path}/app_manager/include/appmgr", 34 "${ability_runtime_path}/frameworks/ets/ani/enum_convert", 35 "${ability_runtime_path}/interfaces/kits/native/appkit/ability_runtime/app", 36 "${ability_runtime_path}/interfaces/kits/native/appkit/ability_runtime/context", 37 "${ability_runtime_path}/interfaces/kits/native/ability/native", 38 "${ability_runtime_services_path}/common/include", 39 ] 40 41 public_configs = [ ":ani_common_public_config" ] 42 43 sources = [ 44 "src/ani_common_ability_result.cpp", 45 "src/ani_common_ability_state_data.cpp", 46 "src/ani_common_configuration.cpp", 47 "src/ani_common_execute_param.cpp", 48 "src/ani_common_execute_result.cpp", 49 "src/ani_common_start_options.cpp", 50 "src/ani_common_util.cpp", 51 "src/ani_common_want.cpp", 52 "src/context_transfer.cpp", 53 "src/ets_application_context_utils.cpp", 54 "src/ets_context_utils.cpp", 55 "src/ets_data_struct_converter.cpp", 56 "src/ets_error_utils.cpp", 57 "src/ets_extension_context.cpp", 58 "src/ets_free_install_observer.cpp", 59 ] 60 61 cflags = [] 62 if (target_cpu == "arm") { 63 cflags += [ "-DBINDER_IPC_32BIT" ] 64 } 65 66 deps = [ 67 "${ability_runtime_innerkits_path}/ability_manager:ability_manager", 68 "${ability_runtime_innerkits_path}/ability_manager:ability_start_options", 69 "${ability_runtime_innerkits_path}/ability_manager:process_options", 70 "${ability_runtime_innerkits_path}/ability_manager:start_window_option", 71 "${ability_runtime_innerkits_path}/app_manager:app_manager", 72 "${ability_runtime_innerkits_path}/runtime:runtime", 73 "${ability_runtime_native_path}/ability/native:ability_business_error", 74 "${ability_runtime_native_path}/ability/native:abilitykit_native", 75 "${ability_runtime_native_path}/appkit:app_context", 76 "${ability_runtime_native_path}/appkit:application_context_manager", 77 ] 78 79 external_deps = [ 80 "ability_base:base", 81 "ability_base:session_info", 82 "ability_base:want", 83 "access_token:libtokenid_sdk", 84 "bundle_framework:appexecfwk_base", 85 "bundle_framework:bms_ani_common", 86 "c_utils:utils", 87 "common_event_service:cesfwk_innerkits", 88 "eventhandler:libeventhandler", 89 "hilog:libhilog", 90 "hitrace:hitrace_meter", 91 "image_framework:image_ani", 92 "ipc:ipc_core", 93 "ipc:ipc_napi", 94 "json:nlohmann_json_static", 95 "napi:ace_napi", 96 "resource_management:global_resmgr", 97 "resource_management:resmgr_napi_core", 98 "resource_management:resourceManager_ani", 99 "runtime_core:ani", 100 ] 101 102 innerapi_tags = [ "platformsdk" ] 103 subsystem_name = "ability" 104 part_name = "ability_runtime" 105} 106