• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2023-2024 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("sec_comp_enhance_config") {
19  visibility = [ ":*" ]
20  include_dirs = [
21    "include",
22    "${sec_comp_root_dir}/frameworks/common/include",
23    "${sec_comp_root_dir}/frameworks/enhance_adapter/include",
24  ]
25}
26
27ohos_source_set("security_component_enhance_sdk_src_set") {
28  subsystem_name = "security"
29  part_name = "security_component_manager"
30  sanitize = {
31    cfi = true
32    cfi_cross_dso = true
33    debug = false
34  }
35  branch_protector_ret = "pac_ret"
36  public_configs = [ ":sec_comp_enhance_config" ]
37
38  include_dirs = [
39    "include",
40    "${sec_comp_root_dir}/frameworks/common/include",
41    "${sec_comp_root_dir}/frameworks/enhance_adapter/include",
42    "${sec_comp_root_dir}/interfaces/inner_api/security_component/include",
43  ]
44
45  sources = [ "src/sec_comp_enhance_kit.cpp" ]
46
47  deps = [ "${sec_comp_root_dir}/frameworks:security_component_enhance_adapter_src_set" ]
48
49  configs = [ "${sec_comp_root_dir}/config:coverage_flags" ]
50
51  external_deps = [
52    "c_utils:utils",
53    "hilog:libhilog",
54    "ipc:ipc_single",
55  ]
56
57  cflags_cc = [
58    "-DHILOG_ENABLE",
59    "-fvisibility=hidden",
60  ]
61}
62
63ohos_source_set("security_component_no_cfi_enhance_sdk_src_set") {
64  branch_protector_ret = "pac_ret"
65  subsystem_name = "security"
66  part_name = "security_component_manager"
67  public_configs = [ ":sec_comp_enhance_config" ]
68
69  include_dirs = [
70    "include",
71    "${sec_comp_root_dir}/frameworks/common/include",
72    "${sec_comp_root_dir}/frameworks/enhance_adapter/include",
73  ]
74
75  sources = [ "src/sec_comp_enhance_kit.cpp" ]
76
77  deps = [ "${sec_comp_root_dir}/frameworks:security_component_no_cfi_enhance_adapter_src_set" ]
78
79  configs = [ "${sec_comp_root_dir}/config:coverage_flags" ]
80
81  external_deps = [
82    "c_utils:utils",
83    "hilog:libhilog",
84    "ipc:ipc_single",
85    "json:nlohmann_json_static",
86  ]
87
88  cflags_cc = [
89    "-DHILOG_ENABLE",
90    "-fvisibility=hidden",
91  ]
92}
93