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/common/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/service_init_manager.cpp", 46 "src/template_cache_manager.cpp", 47 "src/user_auth_service.cpp", 48 "src/user_idm_service.cpp", 49 ] 50 51 deps = [ 52 "../../common:iam_utils", 53 "../../frameworks/native/common:attributes", 54 "../../frameworks/native/common:dfx", 55 "../../frameworks/native/ipc:userauth_service_ipc", 56 "../context:userauth_service_context", 57 "../remote_connect:userauth_service_remote_connect", 58 ] 59 60 external_deps = [ 61 "ability_runtime:app_manager", 62 "access_token:libaccesstoken_sdk", 63 "c_utils:utils", 64 "device_manager:devicemanagersdk", 65 "drivers_interface_user_auth:libuser_auth_proxy_4.0", 66 "dsoftbus:softbus_client", 67 "hdf_core:libhdf_utils", 68 "hdf_core:libhdi", 69 "hilog:libhilog", 70 "hitrace:hitrace_meter", 71 "init:libbeget_proxy", 72 "ipc:ipc_single", 73 "napi:ace_napi", 74 "safwk:system_ability_fwk", 75 "samgr:samgr_proxy", 76 ] 77 78 if (has_os_account_part) { 79 cflags_cc = [ "-DHAS_OS_ACCOUNT_PART" ] 80 external_deps += [ "os_account:os_account_innerkits" ] 81 } 82 83 configs = [ 84 "../base:userauth_service_base_config", 85 "../../common:iam_log_config", 86 "../core:userauth_service_core_config", 87 "../remote_connect:userauth_service_remote_connect_config", 88 "../load_mode:userauth_service_load_mode_config", 89 ] 90 91 subsystem_name = "useriam" 92 part_name = "user_auth_framework" 93} 94