1# Copyright (c) 2023 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("child_process_manager_config") { 18 visibility = [ ":*" ] 19 include_dirs = [ 20 "${ability_runtime_ndk_path}/ability/ability_runtime/child_process", 21 "include", 22 ] 23 24 if (target_cpu == "arm") { 25 cflags = [ "-DBINDER_IPC_32BIT" ] 26 } 27} 28 29ohos_shared_library("child_process_manager") { 30 configs = [ "${ability_runtime_services_path}/common:common_config" ] 31 public_configs = [ ":child_process_manager_config" ] 32 33 sources = [ 34 "${ability_runtime_native_path}/ability/native/child_process_manager/child_process.cpp", 35 "${ability_runtime_native_path}/ability/native/child_process_manager/child_process_manager.cpp", 36 "${ability_runtime_native_path}/ability/native/child_process_manager/child_process_manager_error_utils.cpp", 37 "${ability_runtime_native_path}/ability/native/child_process_manager/js_child_process.cpp", 38 "${ability_runtime_native_path}/ability/native/child_process_manager/native_args_child_process.cpp", 39 "${ability_runtime_native_path}/ability/native/child_process_manager/native_child_ipc_process.cpp", 40 ] 41 42 deps = [ 43 "${ability_runtime_innerkits_path}/app_manager:app_manager", 44 "${ability_runtime_innerkits_path}/runtime:runtime", 45 "${ability_runtime_napi_path}/inner/napi_common:napi_common", 46 "${ability_runtime_native_path}/appkit:app_context", 47 "${ability_runtime_services_path}/common:app_util", 48 ] 49 50 external_deps = [ 51 "ability_base:extractortool", 52 "bundle_framework:appexecfwk_base", 53 "bundle_framework:appexecfwk_core", 54 "c_utils:utils", 55 "eventhandler:libeventhandler", 56 "hilog:libhilog", 57 "init:libbegetutil", 58 "ipc:ipc_capi", 59 "ipc:ipc_core", 60 "napi:ace_napi", 61 "samgr:samgr_proxy", 62 ] 63 64 defines = [] 65 if (background_task_mgr_continuous_task_enable) { 66 defines += [ "BGTASKMGR_CONTINUOUS_TASK_ENABLE" ] 67 } 68 69 innerapi_tags = [ "platformsdk" ] 70 subsystem_name = "ability" 71 part_name = "ability_runtime" 72} 73