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 35 deps = [ 36 "${ability_runtime_innerkits_path}/app_manager:app_manager", 37 "${ability_runtime_innerkits_path}/runtime:runtime", 38 "${ability_runtime_napi_path}/inner/napi_common:napi_common", 39 "${ability_runtime_native_path}/appkit:app_context", 40 "${ability_runtime_services_path}/common:app_util", 41 ] 42 43 external_deps = [ 44 "ability_base:extractortool", 45 "bundle_framework:appexecfwk_base", 46 "bundle_framework:appexecfwk_core", 47 "c_utils:utils", 48 "eventhandler:libeventhandler", 49 "hilog:libhilog", 50 "init:libbegetutil", 51 "ipc:ipc_capi", 52 "ipc:ipc_core", 53 "napi:ace_napi", 54 "samgr:samgr_proxy", 55 ] 56 57 defines = [] 58 if (ability_runtime_child_process) { 59 defines += [ "SUPPORT_CHILD_PROCESS" ] 60 sources += [ 61 "${ability_runtime_native_path}/ability/native/child_process_manager/child_process.cpp", 62 "${ability_runtime_native_path}/ability/native/child_process_manager/child_process_manager.cpp", 63 "${ability_runtime_native_path}/ability/native/child_process_manager/child_process_manager_error_utils.cpp", 64 "${ability_runtime_native_path}/ability/native/child_process_manager/js_child_process.cpp", 65 "${ability_runtime_native_path}/ability/native/child_process_manager/native_args_child_process.cpp", 66 "${ability_runtime_native_path}/ability/native/child_process_manager/native_child_ipc_process.cpp", 67 ] 68 } 69 if (background_task_mgr_continuous_task_enable) { 70 defines += [ "BGTASKMGR_CONTINUOUS_TASK_ENABLE" ] 71 } 72 73 innerapi_tags = [ "platformsdk" ] 74 subsystem_name = "ability" 75 part_name = "ability_runtime" 76} 77