• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2022 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("../screenlock.gni")
16
17config("screenlock_mgr_service_config") {
18  visibility = [ ":*" ]
19  include_dirs = [
20    "include",
21    "${screenlock_mgr_path}/frameworks/native/include",
22    "${screenlock_mgr_path}/interfaces/inner_api/include",
23  ]
24}
25
26ohos_shared_library("screenlock_server") {
27  sanitize = {
28    cfi = true
29    cfi_cross_dso = true
30    debug = false
31    integer_overflow = false
32    boundary_sanitize = false
33    cfi_vcall_icall_only = true
34    ubsan = false
35  }
36  branch_protector_ret = "pac_ret"
37  sources = [
38    "src/command.cpp",
39    "src/commeventsubscriber.cpp",
40    "src/dump_helper.cpp",
41    "src/innerlistenermanager.cpp",
42    "src/preferences_util.cpp",
43    "src/screenlock_callback_proxy.cpp",
44    "src/screenlock_get_info_callback.cpp",
45    "src/screenlock_inner_listener_proxy.cpp",
46    "src/screenlock_manager_stub.cpp",
47    "src/screenlock_system_ability.cpp",
48    "src/screenlock_system_ability_proxy.cpp",
49    "src/strongauthmanager.cpp",
50  ]
51
52  public_configs = [ ":screenlock_mgr_service_config" ]
53
54  cflags = [
55    "-fdata-sections",
56    "-ffunction-sections",
57    "-Os",
58    "-fno-merge-all-constants",
59  ]
60
61  cflags_cc = [
62     "-fvisibility-inlines-hidden",
63     "-fvisibility=hidden",
64     "-fno-asynchronous-unwind-tables",
65     "-fno-unwind-tables",
66  ]
67
68  if (factory == true) {
69    cflags_cc += [ "-DCONFIG_FACTORY_MODE" ]
70  }
71
72  shlib_type = "sa"
73
74  external_deps = [
75    "ability_base:want",
76    "ability_runtime:ability_manager",
77    "access_token:libaccesstoken_sdk",
78    "access_token:libtokenid_sdk",
79    "c_utils:utils",
80    "common_event_service:cesfwk_innerkits",
81    "eventhandler:libeventhandler",
82    "ffrt:libffrt",
83    "hilog:libhilog",
84    "hitrace:hitrace_meter",
85    "init:libbeget_proxy",
86    "ipc:ipc_single",
87    "os_account:os_account_innerkits",
88    "preferences:native_preferences",
89    "safwk:system_ability_fwk",
90    "samgr:samgr_proxy",
91    "time_service:time_client",
92    "user_auth_framework:userauth_client",
93    "window_manager:libdm",
94    "window_manager:libwm",
95  ]
96
97  if (screenlock_mgr_so_crop == true) {
98    cflags += [ "-DIS_SO_CROP_H" ]
99  }
100
101  innerapi_tags = [ "platformsdk" ]
102  subsystem_name = "theme"
103  part_name = "screenlock_mgr"
104}
105
106ohos_static_library("screenlock_server_static") {
107  sanitize = {
108    cfi = true
109    cfi_cross_dso = true
110    debug = false
111    integer_overflow = true
112    boundary_sanitize = true
113    ubsan = true
114  }
115  branch_protector_ret = "pac_ret"
116  sources = [
117    "src/command.cpp",
118    "src/commeventsubscriber.cpp",
119    "src/dump_helper.cpp",
120    "src/innerlistenermanager.cpp",
121    "src/preferences_util.cpp",
122    "src/screenlock_callback_proxy.cpp",
123    "src/screenlock_get_info_callback.cpp",
124    "src/screenlock_inner_listener_proxy.cpp",
125    "src/screenlock_manager_stub.cpp",
126    "src/screenlock_system_ability.cpp",
127    "src/screenlock_system_ability_proxy.cpp",
128    "src/strongauthmanager.cpp",
129  ]
130
131  public_configs = [ ":screenlock_mgr_service_config" ]
132
133  include_dirs = [
134    "${screenlock_mgr_path}/frameworks/native/include",
135    "${screenlock_mgr_path}/utils/include",
136  ]
137
138  external_deps = [
139    "ability_base:want",
140    "ability_runtime:ability_manager",
141    "access_token:libaccesstoken_sdk",
142    "access_token:libtokenid_sdk",
143    "c_utils:utils",
144    "common_event_service:cesfwk_innerkits",
145    "eventhandler:libeventhandler",
146    "ffrt:libffrt",
147    "hilog:libhilog",
148    "hitrace:hitrace_meter",
149    "init:libbeget_proxy",
150    "ipc:ipc_single",
151    "os_account:os_account_innerkits",
152    "preferences:native_preferences",
153    "safwk:system_ability_fwk",
154    "samgr:samgr_proxy",
155    "time_service:time_client",
156    "user_auth_framework:userauth_client",
157    "window_manager:libdm",
158    "window_manager:libwm",
159  ]
160
161  if (screenlock_mgr_so_crop == true) {
162    cflags = [ "-DIS_SO_CROP_H" ]
163  }
164
165  subsystem_name = "theme"
166  part_name = "screenlock_mgr"
167}
168