• 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")
15import("../../../user_auth_framework.gni")
16
17config("userauth_client_config") {
18  include_dirs = [
19    "inc",
20    "../../../interfaces/inner_api",
21  ]
22}
23
24ohos_shared_library("userauth_client") {
25  sanitize = {
26    integer_overflow = true
27    ubsan = true
28    boundary_sanitize = true
29    cfi = true
30    cfi_cross_dso = true
31    debug = false
32    blocklist = "../../../cfi_blocklist.txt"
33  }
34  branch_protector_ret = "pac_ret"
35  include_dirs = [
36    "inc",
37    "../../../interfaces/inner_api",
38    "../../common/inc",
39  ]
40
41  sources = [
42    "src/auth_message_impl.cpp",
43    "src/callback_manager_impl.cpp",
44    "src/co_auth_client_impl.cpp",
45    "src/event_listener_callback_service.cpp",
46    "src/executor_callback_service.cpp",
47    "src/executor_messenger_client.cpp",
48    "src/ipc_client_utils.cpp",
49    "src/load_mode_client_util.cpp",
50    "src/modal_callback_service.cpp",
51    "src/user_access_ctrl_callback_service.cpp",
52    "src/user_access_ctrl_client_impl.cpp",
53    "src/user_auth_callback_service.cpp",
54    "src/user_auth_client_impl.cpp",
55    "src/user_auth_modal_inner_callback.cpp",
56    "src/user_auth_napi_client_impl.cpp",
57    "src/user_idm_callback_service.cpp",
58    "src/user_idm_client_impl.cpp",
59    "src/widget_callback_service.cpp",
60  ]
61
62  defines = []
63
64  if (user_auth_framework_enable_dynamic_load) {
65    defines += [ "ENABLE_DYNAMIC_LOAD" ]
66  }
67
68  configs = [
69    "../../../common:iam_log_config",
70    "../../../common:iam_utils_config",
71  ]
72
73  remove_configs = [ "//build/config/compiler:no_exceptions" ]
74
75  public_configs = [
76    ":userauth_client_config",
77    "../ipc:userauth_client_ipc_config",
78  ]
79
80  innerapi_tags = [ "platformsdk" ]
81
82  deps = [
83    "../common:attributes",
84    "../common:dfx",
85    "../ipc:userauth_client_ipc",
86  ]
87
88  if (use_musl) {
89    version_script = "user_auth_client_map"
90  }
91
92  external_deps = [
93    "access_token:libaccesstoken_sdk",
94    "c_utils:utils",
95    "hilog:libhilog",
96    "init:libbeget_proxy",
97    "init:libbegetutil",
98    "ipc:ipc_single",
99    "ipc:ipc_single",
100    "napi:ace_napi",
101    "samgr:samgr_proxy",
102  ]
103
104  subsystem_name = "useriam"
105  part_name = "user_auth_framework"
106}
107