• 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")
16event_filter_path = "${mmi_path}/service/filter"
17
18config("mmi_event_filter_config") {
19  include_dirs = [
20    "${mmi_path}/interfaces/native/innerkits/common/include",
21    "${mmi_path}/interfaces/native/innerkits/event/include",
22    "${mmi_path}/service/connect_manager/include",
23    "${mmi_path}/service/device_config/include",
24    "${mmi_path}/service/event_handler/include",
25    "${mmi_path}/service/device_manager/include",
26    "${mmi_path}/util/common/include",
27    "${mmi_path}/util/network/include",
28    "${mmi_path}/util/socket/include",
29    "${event_filter_path}/include",
30  ]
31}
32
33ohos_source_set("mmi_event_filter_service") {
34  part_name = "input"
35  subsystem_name = "multimodalinput"
36  stack_protector_ret = true
37  sanitize = {
38    cfi = true
39    cfi_cross_dso = true
40    debug = false
41  }
42  sources = [
43    "${event_filter_path}/src/event_filter_service.cpp",
44    "${event_filter_path}/src/event_filter_stub.cpp",
45  ]
46
47  configs = [ ":mmi_event_filter_config" ]
48
49  external_deps = [
50    "hilog:libhilog",
51    "ipc:ipc_single",
52    "safwk:system_ability_fwk",
53  ]
54}
55
56ohos_source_set("mmi_event_filter_proxy") {
57  part_name = "input"
58  subsystem_name = "multimodalinput"
59  stack_protector_ret = true
60  sanitize = {
61    cfi = true
62    cfi_cross_dso = true
63    debug = false
64  }
65  sources = [
66    "${event_filter_path}/src/event_filter_death_recipient.cpp",
67    "${event_filter_path}/src/event_filter_handler.cpp",
68    "${event_filter_path}/src/event_filter_proxy.cpp",
69  ]
70
71  configs = [ ":mmi_event_filter_config" ]
72
73  defines = input_default_defines
74
75  external_deps = [
76    "hilog:libhilog",
77    "ipc:ipc_single",
78    "safwk:system_ability_fwk",
79  ]
80
81  if (is_ohos && is_clang && (target_cpu == "arm" || target_cpu == "arm64") &&
82      enhanced_opt) {
83    cflags = []
84    if (input_feature_enable_pgo && input_feature_product != "default") {
85      cflags += [
86        "-fprofile-use=" +
87            rebase_path("${input_feature_pgo_path}/libmmi-server.profdata",
88                        root_build_dir),
89        "-Wno-error=backend-plugin",
90        "-Wno-profile-instr-out-of-date",
91        "-Wno-profile-instr-unprofiled",
92      ]
93    }
94    if (input_feature_product == "pc" && target_cpu == "arm64") {
95      cflags += [ "-moutline-atomics" ]
96    }
97  }
98}
99