1# Copyright (c) 2022 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
17ohos_prebuilt_etc("quick_fix.cfg") {
18  relative_install_dir = "init"
19  source = "quick_fix.cfg"
20  part_name = "ability_runtime"
21  subsystem_name = "ability"
22}
23
24config("quickfixms_config") {
25  visibility = [ ":*" ]
26  include_dirs = [ "include" ]
27  cflags = []
28  if (target_cpu == "arm") {
29    cflags += [ "-DBINDER_IPC_32BIT" ]
30  }
31}
32
33quickfixms_sources = [
34  "src/quick_fix_manager_apply_task.cpp",
35  "src/quick_fix_manager_service.cpp",
36  "src/quick_fix_manager_service_ability.cpp",
37]
38
39ohos_shared_library("quickfixms") {
40  sanitize = {
41    cfi = true
42    cfi_cross_dso = true
43    debug = false
44  }
45  branch_protector_ret = "pac_ret"
46  include_dirs = [ "${ability_runtime_path}/interfaces/kits/native/appkit/ability_bundle_manager_helper" ]
47  shlib_type = "sa"
48  configs = [ "${ability_runtime_services_path}/common:common_config" ]
49  public_configs = [ ":quickfixms_config" ]
50
51  sources = quickfixms_sources
52
53  defines = [ "AMS_LOG_TAG = \"QuickFixService\"" ]
54
55  deps = [
56    "${ability_runtime_innerkits_path}/app_manager:app_manager",
57    "${ability_runtime_innerkits_path}/quick_fix:quickfix_manager",
58    "${ability_runtime_native_path}/appkit:appkit_manager_helper",
59    "${ability_runtime_services_path}/common:perm_verification",
60  ]
61
62  external_deps = [
63    "ability_base:want",
64    "bundle_framework:appexecfwk_base",
65    "bundle_framework:appexecfwk_core",
66    "c_utils:utils",
67    "common_event_service:cesfwk_innerkits",
68    "eventhandler:libeventhandler",
69    "hilog:libhilog",
70    "hitrace:hitrace_meter",
71    "ipc:ipc_single",
72    "safwk:system_ability_fwk",
73    "samgr:samgr_proxy",
74  ]
75
76  subsystem_name = "ability"
77  part_name = "ability_runtime"
78}
79
80# Note: Just for test
81ohos_static_library("quickfixms_static") {
82  include_dirs = [ "${ability_runtime_path}/interfaces/kits/native/appkit/ability_bundle_manager_helper" ]
83  configs = [ "${ability_runtime_services_path}/common:common_config" ]
84  public_configs = [ ":quickfixms_config" ]
85
86  sources = quickfixms_sources
87
88  defines = [ "AMS_LOG_TAG = \"QuickFixService\"" ]
89
90  deps = [ "${ability_runtime_services_path}/common:perm_verification" ]
91
92  external_deps = [
93    "ability_base:want",
94    "ability_runtime:app_manager",
95    "ability_runtime:quickfix_manager",
96    "bundle_framework:appexecfwk_base",
97    "bundle_framework:appexecfwk_core",
98    "c_utils:utils",
99    "common_event_service:cesfwk_innerkits",
100    "eventhandler:libeventhandler",
101    "hilog:libhilog",
102    "hitrace:hitrace_meter",
103    "ipc:ipc_single",
104    "safwk:system_ability_fwk",
105    "samgr:samgr_proxy",
106  ]
107
108  subsystem_name = "ability"
109  part_name = "ability_runtime"
110}
111