# Copyright (c) 2021-2022 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/ohos.gni") import("../../multimodalinput_mini.gni") event_filter_path = "${mmi_path}/service/filter" config("mmi_event_filter_config") { include_dirs = [ "${mmi_path}/interfaces/native/innerkits/common/include", "${mmi_path}/interfaces/native/innerkits/event/include", "${mmi_path}/service/connect_manager/include", "${mmi_path}/service/device_config/include", "${mmi_path}/service/event_handler/include", "${mmi_path}/service/device_manager/include", "${mmi_path}/util/common/include", "${mmi_path}/util/network/include", "${mmi_path}/util/socket/include", "${event_filter_path}/include", ] } ohos_source_set("mmi_event_filter_service") { part_name = "input" subsystem_name = "multimodalinput" stack_protector_ret = true sanitize = { cfi = true cfi_cross_dso = true debug = false } sources = [ "${event_filter_path}/src/event_filter_service.cpp", "${event_filter_path}/src/event_filter_stub.cpp", ] configs = [ ":mmi_event_filter_config" ] external_deps = [ "hilog:libhilog", "ipc:ipc_single", "safwk:system_ability_fwk", ] } ohos_source_set("mmi_event_filter_proxy") { part_name = "input" subsystem_name = "multimodalinput" stack_protector_ret = true sanitize = { cfi = true cfi_cross_dso = true debug = false } sources = [ "${event_filter_path}/src/event_filter_death_recipient.cpp", "${event_filter_path}/src/event_filter_handler.cpp", "${event_filter_path}/src/event_filter_proxy.cpp", ] configs = [ ":mmi_event_filter_config" ] defines = input_default_defines external_deps = [ "hilog:libhilog", "ipc:ipc_single", "safwk:system_ability_fwk", ] if (is_ohos && is_clang && (target_cpu == "arm" || target_cpu == "arm64") && enhanced_opt) { cflags = [] if (input_feature_enable_pgo && input_feature_product != "default") { cflags += [ "-fprofile-use=" + rebase_path("${input_feature_pgo_path}/libmmi-server.profdata", root_build_dir), "-Wno-error=backend-plugin", "-Wno-profile-instr-out-of-date", "-Wno-profile-instr-unprofiled", ] } if (input_feature_product == "pc" && target_cpu == "arm64") { cflags += [ "-moutline-atomics" ] } } }