• 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_frameworks_native_config") {
18  visibility = [ ":*" ]
19  include_dirs = [
20    "include",
21    "${screenlock_mgr_path}/frameworks/native/include",
22    "${screenlock_mgr_path}/services/include",
23  ]
24
25  cflags_cc = []
26}
27
28ohos_shared_library("screenlock_client") {
29  if (is_standard_system) {
30    sanitize = {
31      cfi = true
32      cfi_cross_dso = true
33      debug = false
34      integer_overflow = false
35      boundary_sanitize = false
36      ubsan = false
37      cfi_vcall_icall_only = true
38    }
39    branch_protector_ret = "pac_ret"
40    sources = [
41      "${screenlock_mgr_path}/frameworks/native/src/screenlock_callback_stub.cpp",
42      "${screenlock_mgr_path}/frameworks/native/src/screenlock_inner_listener_stub.cpp",
43      "${screenlock_mgr_path}/frameworks/native/src/screenlock_inner_listener_wapper.cpp",
44      "${screenlock_mgr_path}/frameworks/native/src/screenlock_manager.cpp",
45      "${screenlock_mgr_path}/frameworks/native/src/screenlock_manager_proxy.cpp",
46      "${screenlock_mgr_path}/frameworks/native/src/screenlock_system_ability_stub.cpp",
47    ]
48
49    cflags = [
50      "-fdata-sections",
51      "-ffunction-sections",
52      "-Os",
53      "-fno-merge-all-constants",
54    ]
55
56    cflags_cc = [
57     "-fvisibility-inlines-hidden",
58     "-fvisibility=hidden",
59     "-fno-asynchronous-unwind-tables",
60     "-fno-unwind-tables"
61    ]
62
63    version_script = "screenlock_client.versionscript"
64
65    public_configs = [ ":screenlock_mgr_frameworks_native_config" ]
66
67    include_dirs = [
68      "include",
69      "${screenlock_mgr_path}/frameworks/native/include",
70    ]
71
72    external_deps = [
73      "c_utils:utils",
74      "eventhandler:libeventhandler",
75      "hilog:libhilog",
76      "hitrace:hitrace_meter",
77      "ipc:ipc_single",
78      "samgr:samgr_proxy",
79    ]
80    subsystem_name = "theme"
81    innerapi_tags = [
82      "platformsdk",
83      "sasdk",
84    ]
85    part_name = "screenlock_mgr"
86  }
87}
88ohos_static_library("screenlock_client_static") {
89  if (is_standard_system) {
90    sanitize = {
91      cfi = true
92      cfi_cross_dso = true
93      debug = false
94      integer_overflow = true
95      boundary_sanitize = true
96      ubsan = true
97    }
98    branch_protector_ret = "pac_ret"
99    sources = [
100      "${screenlock_mgr_path}/frameworks/native/src/screenlock_callback_stub.cpp",
101      "${screenlock_mgr_path}/frameworks/native/src/screenlock_inner_listener_stub.cpp",
102      "${screenlock_mgr_path}/frameworks/native/src/screenlock_inner_listener_wapper.cpp",
103      "${screenlock_mgr_path}/frameworks/native/src/screenlock_manager.cpp",
104      "${screenlock_mgr_path}/frameworks/native/src/screenlock_manager_proxy.cpp",
105      "${screenlock_mgr_path}/frameworks/native/src/screenlock_system_ability_stub.cpp",
106    ]
107
108    public_configs = [ ":screenlock_mgr_frameworks_native_config" ]
109
110    include_dirs = [
111      "include",
112      "${screenlock_mgr_path}/frameworks/native/include",
113    ]
114
115    external_deps = [
116      "c_utils:utils",
117      "eventhandler:libeventhandler",
118      "hilog:libhilog",
119      "hitrace:hitrace_meter",
120      "ipc:ipc_single",
121      "samgr:samgr_proxy",
122    ]
123    subsystem_name = "theme"
124    part_name = "screenlock_mgr"
125  }
126}
127