• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-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("../../multimodalinput_mini.gni")
16mmi_connect_manager_path = "${mmi_path}/service/connect_manager"
17
18config("mmi_connect_manager_config") {
19  include_dirs = [
20    "${mmi_path}/common/anco/comm/include",
21    "${mmi_path}/interfaces/native/innerkits/common/include",
22    "${mmi_path}/interfaces/native/innerkits/event/include",
23    "${mmi_path}/interfaces/native/innerkits/proxy/include",
24    "${mmi_path}/util/common/include",
25    "${mmi_path}/util/network/include",
26    "${mmi_path}/util/socket/include",
27    "${mmi_path}/service/delegate_task/include",
28    "${mmi_path}/service/filter/include",
29    "${mmi_path}/service/message_handle/include",
30    "${mmi_path}/service/module_loader/include",
31    "${mmi_path}/service/nap_process/include",
32    "${mmi_path}/service/permission_helper/include",
33    "${mmi_path}/frameworks/proxy/event_handler/include",
34    "${mmi_connect_manager_path}/include",
35  ]
36}
37
38ohos_source_set("mmi_connect_manager_service") {
39  part_name = "input"
40  subsystem_name = "multimodalinput"
41
42  sources = [
43    "${mmi_connect_manager_path}/src/multimodal_input_connect_def_parcel.cpp",
44    "${mmi_connect_manager_path}/src/multimodal_input_connect_stub.cpp",
45  ]
46
47  sources += [
48    "${mmi_connect_manager_path}/src/input_binder_client_death_recipient.cpp",
49  ]
50
51  branch_protector_ret = "pac_ret"
52  sanitize = {
53    cfi = true
54    cfi_cross_dso = true
55    debug = false
56  }
57  defines = input_default_defines
58
59  configs = [ ":mmi_connect_manager_config" ]
60
61  external_deps = [
62    "access_token:libaccesstoken_sdk",
63    "eventhandler:libeventhandler",
64    "image_framework:image_native",
65    "ipc:ipc_single",
66    "samgr:samgr_proxy",
67  ]
68
69  if (input_feature_product != "watch") {
70    external_deps += [
71      "bounds_checking_function:libsec_shared",
72      "c_utils:utilsbase",
73      "graphic_2d:2d_graphics",
74      "hilog:libhilog",
75      "safwk:system_ability_fwk",
76    ]
77  }
78
79  if (is_ohos && is_clang && (target_cpu == "arm" || target_cpu == "arm64") &&
80      enhanced_opt) {
81    cflags = []
82    if (input_feature_enable_pgo && input_feature_product != "default") {
83      cflags += [
84        "-fprofile-use=" +
85            rebase_path("${input_feature_pgo_path}/libmmi-server.profdata",
86                        root_build_dir),
87        "-Wno-error=backend-plugin",
88        "-Wno-profile-instr-out-of-date",
89        "-Wno-profile-instr-unprofiled",
90        "-Oz",
91      ]
92    }
93    if (input_feature_product == "pc" && target_cpu == "arm64") {
94      cflags += [
95        "-moutline-atomics",
96        "-Oz",
97      ]
98    }
99  }
100}
101
102ohos_source_set("mmi_connect_manager_proxy") {
103  part_name = "input"
104  subsystem_name = "multimodalinput"
105
106  branch_protector_ret = "pac_ret"
107  sanitize = {
108    cfi = true
109    cfi_cross_dso = true
110    debug = false
111  }
112  defines = input_default_defines
113
114  sources = [
115    "${mmi_connect_manager_path}/src/multimodal_input_connect_death_recipient.cpp",
116    "${mmi_connect_manager_path}/src/multimodal_input_connect_def_parcel.cpp",
117    "${mmi_connect_manager_path}/src/multimodal_input_connect_manager.cpp",
118    "${mmi_connect_manager_path}/src/multimodal_input_connect_proxy.cpp",
119  ]
120
121  sources += [
122    "${mmi_connect_manager_path}/src/input_binder_client_server.cpp",
123    "${mmi_connect_manager_path}/src/input_binder_client_stub.cpp",
124  ]
125
126  configs = [ ":mmi_connect_manager_config" ]
127
128  external_deps = [
129    "bounds_checking_function:libsec_shared",
130    "c_utils:utilsbase",
131    "eventhandler:libeventhandler",
132    "graphic_2d:2d_graphics",
133    "hilog:libhilog",
134    "image_framework:image_native",
135    "ipc:ipc_single",
136    "safwk:system_ability_fwk",
137    "samgr:samgr_proxy",
138  ]
139}
140