1# Copyright (c) 2024 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_ndk_config") { 18 include_dirs = 19 [ "${ability_runtime_ndk_path}/ability/ability_runtime/child_process" ] 20 21 if (target_cpu == "arm") { 22 cflags = [ "-DBINDER_IPC_32BIT" ] 23 } 24} 25 26ohos_shared_library("child_process") { 27 sanitize = { 28 integer_overflow = true 29 ubsan = true 30 boundary_sanitize = true 31 cfi = true 32 cfi_cross_dso = true 33 cfi_vcall_icall_only = true 34 debug = false 35 } 36 branch_protector_ret = "pac_ret" 37 38 include_dirs = [ "include" ] 39 40 configs = [ "${ability_runtime_services_path}/common:common_config" ] 41 public_configs = [ ":child_process_ndk_config" ] 42 43 sources = [ 44 "${ability_runtime_native_path}/child_process/src/native_child_callback.cpp", 45 "${ability_runtime_native_path}/child_process/src/native_child_process.cpp", 46 ] 47 48 deps = [ 49 "${ability_runtime_innerkits_path}/app_manager:app_manager", 50 "${ability_runtime_innerkits_path}/child_process_manager:child_process_manager", 51 "${ability_runtime_native_path}/ability/native:ability_business_error", 52 ] 53 54 external_deps = [ 55 "c_utils:utils", 56 "hilog:libhilog", 57 "ipc:ipc_capi", 58 "ipc:ipc_core", 59 ] 60 61 output_extension = "so" 62 innerapi_tags = [ "ndk" ] 63 install_images = [ "system" ] 64 subsystem_name = "ability" 65 part_name = "ability_runtime" 66} 67