• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 = [ "${ability_runtime_native_path}/child_process/src/child_callback_manager.cpp" ]
44
45  deps = [
46    "${ability_runtime_innerkits_path}/app_manager:app_manager",
47    "${ability_runtime_innerkits_path}/runtime:runtime",
48    "${ability_runtime_native_path}/ability/native:ability_business_error",
49  ]
50
51  external_deps = [
52    "c_utils:utils",
53    "hilog:libhilog",
54    "ipc:ipc_capi",
55    "ipc:ipc_core",
56  ]
57
58  if (ability_runtime_child_process) {
59    sources += [
60      "${ability_runtime_native_path}/child_process/src/native_child_callback.cpp",
61      "${ability_runtime_native_path}/child_process/src/native_child_process.cpp",
62    ]
63    deps += [ "${ability_runtime_innerkits_path}/child_process_manager:child_process_manager" ]
64  }
65
66  output_extension = "so"
67  innerapi_tags = [ "ndk" ]
68  install_images = [ "system" ]
69  subsystem_name = "ability"
70  part_name = "ability_runtime"
71}
72