• 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_js_napi_config") {
18  visibility = [ ":*" ]
19  include_dirs = [ "include" ]
20
21  cflags_cc = []
22}
23
24ohos_shared_library("screenlock") {
25  if (is_standard_system) {
26    sanitize = {
27      cfi = true
28      cfi_cross_dso = true
29      debug = false
30      integer_overflow = false
31      boundary_sanitize = false
32      cfi_vcall_icall_only = true
33      ubsan = false
34    }
35    branch_protector_ret = "pac_ret"
36    include_dirs = [ "${screenlock_mgr_path}/services/include" ]
37
38    public_configs = [ ":screenlock_mgr_frameworks_js_napi_config" ]
39
40    sources = [
41      "src/async_call.cpp",
42      "src/napi_screenlock_ability.cpp",
43      "src/screenlock_callback.cpp",
44      "src/screenlock_js_util.cpp",
45      "src/screenlock_system_ability_callback.cpp",
46      "src/uv_queue.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    deps = [
64      "${screenlock_mgr_path}/interfaces/inner_api:screenlock_client_static",
65    ]
66
67    external_deps = [
68      "c_utils:utils",
69      "eventhandler:libeventhandler",
70      "hilog:libhilog",
71      "hitrace:hitrace_meter",
72      "ipc:ipc_single",
73      "napi:ace_napi",
74    ]
75
76    relative_install_dir = "module"
77    subsystem_name = "theme"
78    part_name = "screenlock_mgr"
79  }
80}
81
82ohos_static_library("screenlock_static") {
83  if (is_standard_system) {
84    sanitize = {
85      cfi = true
86      cfi_cross_dso = true
87      debug = false
88      integer_overflow = true
89      boundary_sanitize = true
90      ubsan = true
91    }
92    branch_protector_ret = "pac_ret"
93    testonly = true
94    include_dirs = [ "${screenlock_mgr_path}/services/include" ]
95
96    public_configs = [ ":screenlock_mgr_frameworks_js_napi_config" ]
97
98    sources = [
99      "src/async_call.cpp",
100      "src/napi_screenlock_ability.cpp",
101      "src/screenlock_callback.cpp",
102      "src/screenlock_js_util.cpp",
103      "src/screenlock_system_ability_callback.cpp",
104      "src/uv_queue.cpp",
105    ]
106
107    deps = [
108      "${screenlock_mgr_path}/interfaces/inner_api:screenlock_client_static",
109    ]
110
111    external_deps = [
112      "c_utils:utils",
113      "eventhandler:libeventhandler",
114      "hilog:libhilog",
115      "hitrace:hitrace_meter",
116      "ipc:ipc_single",
117      "napi:ace_napi",
118    ]
119
120    subsystem_name = "theme"
121    part_name = "screenlock_mgr"
122  }
123}
124