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("security_component_framework_src_set_config") { 19 include_dirs = [ 20 "common/include", 21 "${sec_comp_root_dir}/interfaces/inner_api/security_component/include", 22 ] 23} 24 25ohos_source_set("security_component_framework_src_set") { 26 subsystem_name = "security" 27 part_name = "security_component_manager" 28 sanitize = { 29 cfi = true 30 cfi_cross_dso = true 31 debug = false 32 } 33 branch_protector_ret = "pac_ret" 34 include_dirs = [ 35 "common/include", 36 "security_component/include", 37 "${sec_comp_root_dir}/interfaces/inner_api/security_component/include", 38 ] 39 40 sources = [ 41 "common/src/sec_comp_tool.cpp", 42 "security_component/src/location_button.cpp", 43 "security_component/src/paste_button.cpp", 44 "security_component/src/save_button.cpp", 45 "security_component/src/sec_comp_base.cpp", 46 "security_component/src/sec_comp_click_event_parcel.cpp", 47 ] 48 49 configs = [ "${sec_comp_root_dir}/config:coverage_flags" ] 50 public_configs = [ ":security_component_framework_src_set_config" ] 51 52 external_deps = [ 53 "access_token:libtokenid_sdk", 54 "c_utils:utils", 55 "hilog:libhilog", 56 "ipc:ipc_core", 57 "json:nlohmann_json_static", 58 ] 59 60 cflags_cc = [ 61 "-DHILOG_ENABLE", 62 "-fvisibility=hidden", 63 ] 64} 65 66config("security_component_enhance_adapter_src_set_config") { 67 include_dirs = [ 68 "common/include", 69 "enhance_adapter/include", 70 "${sec_comp_root_dir}/interfaces/inner_api/security_component/include", 71 ] 72} 73 74ohos_source_set("security_component_enhance_adapter_src_set") { 75 subsystem_name = "security" 76 part_name = "security_component_manager" 77 sanitize = { 78 cfi = true 79 cfi_cross_dso = true 80 debug = false 81 } 82 branch_protector_ret = "pac_ret" 83 include_dirs = [ 84 "common/include", 85 "enhance_adapter/include", 86 "${sec_comp_root_dir}/interfaces/inner_api/security_component/include", 87 ] 88 89 sources = [ "enhance_adapter/src/sec_comp_enhance_adapter.cpp" ] 90 91 configs = [ "${sec_comp_root_dir}/config:coverage_flags" ] 92 public_configs = [ ":security_component_enhance_adapter_src_set_config" ] 93 94 external_deps = [ 95 "c_utils:utils", 96 "hilog:libhilog", 97 "ipc:ipc_single", 98 ] 99 100 public_external_deps = [ "json:nlohmann_json_static" ] 101 102 cflags_cc = [ 103 "-DHILOG_ENABLE", 104 "-fvisibility=hidden", 105 ] 106} 107 108ohos_source_set("security_component_no_cfi_framework_src_set") { 109 branch_protector_ret = "pac_ret" 110 subsystem_name = "security" 111 part_name = "security_component_manager" 112 include_dirs = [ 113 "common/include", 114 "security_component/include", 115 "${sec_comp_root_dir}/interfaces/inner_api/security_component/include", 116 ] 117 118 sources = [ 119 "common/src/sec_comp_tool.cpp", 120 "security_component/src/location_button.cpp", 121 "security_component/src/paste_button.cpp", 122 "security_component/src/save_button.cpp", 123 "security_component/src/sec_comp_base.cpp", 124 "security_component/src/sec_comp_click_event_parcel.cpp", 125 ] 126 127 configs = [ "${sec_comp_root_dir}/config:coverage_flags" ] 128 public_configs = [ ":security_component_framework_src_set_config" ] 129 130 external_deps = [ 131 "access_token:libtokenid_sdk", 132 "c_utils:utils", 133 "hilog:libhilog", 134 "ipc:ipc_core", 135 "json:nlohmann_json_static", 136 ] 137 138 cflags_cc = [ 139 "-DHILOG_ENABLE", 140 "-fvisibility=hidden", 141 ] 142} 143 144ohos_source_set("security_component_no_cfi_enhance_adapter_src_set") { 145 branch_protector_ret = "pac_ret" 146 subsystem_name = "security" 147 part_name = "security_component_manager" 148 include_dirs = [ 149 "common/include", 150 "enhance_adapter/include", 151 "${sec_comp_root_dir}/interfaces/inner_api/security_component/include", 152 ] 153 154 sources = [ "enhance_adapter/src/sec_comp_enhance_adapter.cpp" ] 155 156 configs = [ "${sec_comp_root_dir}/config:coverage_flags" ] 157 public_configs = [ ":security_component_enhance_adapter_src_set_config" ] 158 159 external_deps = [ 160 "c_utils:utils", 161 "hilog:libhilog", 162 "ipc:ipc_single", 163 ] 164 165 public_external_deps = [ "json:nlohmann_json_static" ] 166 167 cflags_cc = [ 168 "-DHILOG_ENABLE", 169 "-fvisibility=hidden", 170 ] 171} 172