# 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") mmi_connect_manager_path = "${mmi_path}/service/connect_manager" config("mmi_connect_manager_config") { include_dirs = [ "${mmi_path}/common/anco/comm/include", "${mmi_path}/interfaces/native/innerkits/common/include", "${mmi_path}/interfaces/native/innerkits/event/include", "${mmi_path}/interfaces/native/innerkits/proxy/include", "${mmi_path}/util/common/include", "${mmi_path}/util/network/include", "${mmi_path}/util/socket/include", "${mmi_path}/service/delegate_task/include", "${mmi_path}/service/filter/include", "${mmi_path}/service/message_handle/include", "${mmi_path}/service/module_loader/include", "${mmi_path}/service/nap_process/include", "${mmi_path}/service/permission_helper/include", "${mmi_path}/frameworks/proxy/event_handler/include", "${mmi_connect_manager_path}/include", ] } ohos_source_set("mmi_connect_manager_service") { part_name = "input" subsystem_name = "multimodalinput" sources = [ "${mmi_connect_manager_path}/src/multimodal_input_connect_def_parcel.cpp", "${mmi_connect_manager_path}/src/multimodal_input_connect_stub.cpp", ] sources += [ "${mmi_connect_manager_path}/src/input_binder_client_death_recipient.cpp", ] branch_protector_ret = "pac_ret" sanitize = { cfi = true cfi_cross_dso = true debug = false } defines = input_default_defines configs = [ ":mmi_connect_manager_config" ] external_deps = [ "access_token:libaccesstoken_sdk", "hilog:libhilog", "image_framework:image_native", "ipc:ipc_single", "safwk:system_ability_fwk", "samgr:samgr_proxy", ] if (enable_player_framework) { external_deps += [ "player_framework:media_client" ] } 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" ] } } } ohos_source_set("mmi_connect_manager_proxy") { part_name = "input" subsystem_name = "multimodalinput" branch_protector_ret = "pac_ret" sanitize = { cfi = true cfi_cross_dso = true debug = false } defines = input_default_defines sources = [ "${mmi_connect_manager_path}/src/multimodal_input_connect_death_recipient.cpp", "${mmi_connect_manager_path}/src/multimodal_input_connect_def_parcel.cpp", "${mmi_connect_manager_path}/src/multimodal_input_connect_manager.cpp", "${mmi_connect_manager_path}/src/multimodal_input_connect_proxy.cpp", ] sources += [ "${mmi_connect_manager_path}/src/input_binder_client_server.cpp", "${mmi_connect_manager_path}/src/input_binder_client_stub.cpp", ] configs = [ ":mmi_connect_manager_config" ] external_deps = [ "hilog:libhilog", "image_framework:image_native", "ipc:ipc_single", "safwk:system_ability_fwk", "samgr:samgr_proxy", ] }