• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022-2023 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
23if (!defined(global_parts_info) ||
24    defined(global_parts_info.notification_common_event_service)) {
25  has_notification_common_event_service = true
26} else {
27  has_notification_common_event_service = false
28}
29
30ohos_source_set("userauth_services_ipc") {
31  sanitize = {
32    integer_overflow = true
33    ubsan = true
34    boundary_sanitize = true
35    cfi = true
36    cfi_cross_dso = true
37    debug = false
38    blocklist = "../../cfi_blocklist.txt"
39  }
40  branch_protector_ret = "pac_ret"
41  include_dirs = [
42    "inc",
43    "../../frameworks/js/napi/user_auth/inc",
44  ]
45
46  remove_configs = [ "//build/config/compiler:no_exceptions" ]
47
48  sources = [
49    "src/co_auth_service.cpp",
50    "src/executor_messenger_service.cpp",
51    "src/ipc_common.cpp",
52    "src/user_auth_service.cpp",
53    "src/user_idm_service.cpp",
54  ]
55
56  deps = [
57    "../../common:iam_utils",
58    "../../frameworks/native/common:attributes",
59    "../../frameworks/native/common:dfx",
60    "../../frameworks/native/ipc:userauth_service_ipc",
61    "../context:userauth_service_context",
62  ]
63
64  external_deps = [
65    "ability_runtime:app_manager",
66    "access_token:libaccesstoken_sdk",
67    "access_token:libtokenid_sdk",
68    "c_utils:utils",
69    "drivers_interface_user_auth:libuser_auth_proxy_1.2",
70    "hilog:libhilog",
71    "hitrace:hitrace_meter",
72    "init:libbeget_proxy",
73    "ipc:ipc_single",
74    "napi:ace_napi",
75    "safwk:system_ability_fwk",
76    "samgr:samgr_proxy",
77  ]
78
79  if (has_os_account_part) {
80    cflags_cc = [ "-DHAS_OS_ACCOUNT_PART" ]
81    external_deps += [ "os_account:os_account_innerkits" ]
82  }
83
84  if (has_notification_common_event_service) {
85    sources += [ "src/publish_event_adapter.cpp" ]
86    external_deps += [ "common_event_service:cesfwk_innerkits" ]
87  } else {
88    sources += [ "src/publish_event_adapter_mock.cpp" ]
89  }
90
91  configs = [
92    "../base:userauth_service_base_config",
93    "../../common:iam_log_config",
94    "../core:userauth_service_core_config",
95  ]
96
97  subsystem_name = "useriam"
98  part_name = "user_auth_framework"
99}
100