• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 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
16sec_comp_root_dir = "../../.."
17
18config("security_component_service_config") {
19  include_dirs = [
20    "sa_main",
21    "${sec_comp_root_dir}/frameworks/common/include",
22    "${sec_comp_root_dir}/frameworks/enhance_adapter/include",
23    "${sec_comp_root_dir}/frameworks/security_component/include",
24    "${sec_comp_root_dir}/interfaces/inner_api/security_component/include",
25  ]
26}
27
28ohos_prebuilt_etc("security_component_service.rc") {
29  source = "security_component_service.cfg"
30  relative_install_dir = "init"
31  subsystem_name = "security"
32  part_name = "security_component_manager"
33}
34
35ohos_shared_library("security_component_service") {
36  subsystem_name = "security"
37  part_name = "security_component_manager"
38  sanitize = {
39    cfi = true
40    cfi_cross_dso = true
41    debug = false
42  }
43  branch_protector_ret = "pac_ret"
44  include_dirs = [
45    "sa_main",
46    "${sec_comp_root_dir}/frameworks/common/include",
47    "${sec_comp_root_dir}/frameworks/enhance_adapter/include",
48    "${sec_comp_root_dir}/frameworks/security_component/include",
49    "${sec_comp_root_dir}/interfaces/inner_api/security_component/include",
50  ]
51
52  sources = [
53    "sa_main/app_mgr_death_recipient.cpp",
54    "sa_main/app_state_observer.cpp",
55    "sa_main/delay_exit_task.cpp",
56    "sa_main/first_use_dialog.cpp",
57    "sa_main/sec_comp_entity.cpp",
58    "sa_main/sec_comp_info_helper.cpp",
59    "sa_main/sec_comp_malicious_apps.cpp",
60    "sa_main/sec_comp_manager.cpp",
61    "sa_main/sec_comp_perm_manager.cpp",
62    "sa_main/sec_comp_service.cpp",
63    "sa_main/sec_comp_stub.cpp",
64    "sa_main/sec_event_handler.cpp",
65    "sa_main/window_info_helper.cpp",
66  ]
67
68  cflags_cc = [ "-DHILOG_ENABLE" ]
69  cflags = [ "-DHILOG_ENABLE" ]
70
71  deps = [
72    ":security_component_service.rc",
73    "${sec_comp_root_dir}/frameworks:libsecurity_component_enhance_adapter",
74    "${sec_comp_root_dir}/frameworks:libsecurity_component_framework",
75  ]
76
77  configs = [ "${sec_comp_root_dir}/config:coverage_flags" ]
78  public_configs = [ ":security_component_service_config" ]
79
80  external_deps = [
81    "ability_base:base",
82    "ability_base:want",
83    "ability_runtime:ability_manager",
84    "ability_runtime:app_manager",
85    "ability_runtime:runtime",
86    "access_token:libaccesstoken_sdk",
87    "c_utils:utils",
88    "eventhandler:libeventhandler",
89    "graphic_2d:librender_service_client",
90    "hilog:libhilog",
91    "hisysevent:libhisysevent",
92    "hitrace:hitrace_meter",
93    "ipc:ipc_core",
94    "safwk:system_ability_fwk",
95    "samgr:samgr_proxy",
96    "window_manager:libdm",
97    "window_manager:libwm",
98  ]
99}
100