1# Copyright (c) 2022-2024 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") 15 16if (!defined(global_parts_info) || 17 defined(global_parts_info.account_os_account)) { 18 has_os_account_part = true 19} else { 20 has_os_account_part = false 21} 22 23ohos_source_set("userauth_services_ipc") { 24 sanitize = { 25 integer_overflow = true 26 ubsan = true 27 boundary_sanitize = true 28 cfi = true 29 cfi_cross_dso = true 30 debug = false 31 blocklist = "../../cfi_blocklist.txt" 32 } 33 branch_protector_ret = "pac_ret" 34 include_dirs = [ 35 "inc", 36 "../../frameworks/js/napi/user_auth/inc", 37 ] 38 39 remove_configs = [ "//build/config/compiler:no_exceptions" ] 40 41 sources = [ 42 "src/co_auth_service.cpp", 43 "src/executor_messenger_service.cpp", 44 "src/hdi_message_callback_service.cpp", 45 "src/template_cache_manager.cpp", 46 "src/user_auth_service.cpp", 47 "src/user_idm_service.cpp", 48 ] 49 50 deps = [ 51 "../../common:iam_utils", 52 "../../frameworks/native/common:attributes", 53 "../../frameworks/native/common:dfx", 54 "../../frameworks/native/ipc:userauth_service_ipc", 55 "../context:userauth_service_context", 56 "../remote_connect:userauth_service_remote_connect", 57 ] 58 59 external_deps = [ 60 "ability_runtime:app_manager", 61 "access_token:libaccesstoken_sdk", 62 "c_utils:utils", 63 "device_manager:devicemanagersdk", 64 "drivers_interface_user_auth:libuser_auth_proxy_3.0", 65 "hilog:libhilog", 66 "hitrace:hitrace_meter", 67 "init:libbeget_proxy", 68 "ipc:ipc_single", 69 "napi:ace_napi", 70 "safwk:system_ability_fwk", 71 "samgr:samgr_proxy", 72 ] 73 74 if (has_os_account_part) { 75 cflags_cc = [ "-DHAS_OS_ACCOUNT_PART" ] 76 external_deps += [ "os_account:os_account_innerkits" ] 77 } 78 79 configs = [ 80 "../base:userauth_service_base_config", 81 "../../common:iam_log_config", 82 "../core:userauth_service_core_config", 83 "../remote_connect:userauth_service_remote_connect_config", 84 ] 85 86 subsystem_name = "useriam" 87 part_name = "user_auth_framework" 88} 89