• 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}/interfaces/native/innerkits/common/include",
21    "${mmi_path}/interfaces/native/innerkits/event/include",
22    "${mmi_path}/interfaces/native/innerkits/proxy/include",
23    "${mmi_path}/util/common/include",
24    "${mmi_path}/util/network/include",
25    "${mmi_path}/util/socket/include",
26    "${mmi_path}/service/delegate_task/include",
27    "${mmi_path}/service/filter/include",
28    "${mmi_path}/service/message_handle/include",
29    "${mmi_path}/service/module_loader/include",
30    "${mmi_path}/service/nap_process/include",
31    "${mmi_path}/service/permission_helper/include",
32    "${mmi_path}/frameworks/proxy/event_handler/include",
33    "${mmi_connect_manager_path}/include",
34  ]
35}
36
37ohos_source_set("mmi_connect_manager_service") {
38  part_name = "input"
39  subsystem_name = "multimodalinput"
40  sources = [
41    "${mmi_connect_manager_path}/src/multimodal_input_connect_def_parcel.cpp",
42    "${mmi_connect_manager_path}/src/multimodal_input_connect_stub.cpp",
43  ]
44  stack_protector_ret = true
45  sanitize = {
46    cfi = true
47    cfi_cross_dso = true
48    debug = false
49  }
50  configs = [ ":mmi_connect_manager_config" ]
51
52  external_deps = [
53    "access_token:libaccesstoken_sdk",
54    "hilog:libhilog",
55    "image_framework:image_native",
56    "ipc:ipc_single",
57    "safwk:system_ability_fwk",
58    "samgr:samgr_proxy",
59  ]
60
61  if (is_ohos && is_clang && (target_cpu == "arm" || target_cpu == "arm64") &&
62      enhanced_opt) {
63    cflags = []
64    if (input_feature_enable_pgo && input_feature_product != "default") {
65      cflags += [
66        "-fprofile-use=" +
67            rebase_path("${input_feature_pgo_path}/libmmi-server.profdata",
68                        root_build_dir),
69        "-Wno-error=backend-plugin",
70        "-Wno-profile-instr-out-of-date",
71        "-Wno-profile-instr-unprofiled",
72      ]
73    }
74    if (input_feature_product == "pc" && target_cpu == "arm64") {
75      cflags += [ "-moutline-atomics" ]
76    }
77  }
78}
79
80ohos_source_set("mmi_connect_manager_proxy") {
81  part_name = "input"
82  subsystem_name = "multimodalinput"
83  stack_protector_ret = true
84  sanitize = {
85    cfi = true
86    cfi_cross_dso = true
87    debug = false
88  }
89  sources = [
90    "${mmi_connect_manager_path}/src/multimodal_input_connect_death_recipient.cpp",
91    "${mmi_connect_manager_path}/src/multimodal_input_connect_def_parcel.cpp",
92    "${mmi_connect_manager_path}/src/multimodal_input_connect_manager.cpp",
93    "${mmi_connect_manager_path}/src/multimodal_input_connect_proxy.cpp",
94  ]
95
96  configs = [ ":mmi_connect_manager_config" ]
97
98  external_deps = [
99    "hilog:libhilog",
100    "image_framework:image_native",
101    "ipc:ipc_single",
102    "safwk:system_ability_fwk",
103    "samgr:samgr_proxy",
104  ]
105}
106