• 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("//base/security/security_guard/security_guard.gni")
15import("//build/test.gni")
16
17ohos_source_set("sg_model_manager_stamp") {
18  part_name = "security_guard"
19  subsystem_name = "security"
20
21  configs = [
22    "${sg_root_dir}/services/risk_classify:security_guard_model_configs",
23    "${sg_root_dir}/resource/config/build:coverage_flags",
24  ]
25
26  include_dirs = [
27    "include",
28    "${sg_root_dir}/frameworks/common/constants/include",
29    "${sg_root_dir}/frameworks/common/json/include",
30    "${sg_root_dir}/frameworks/common/task_handler/include",
31    "${sg_root_dir}/frameworks/common/database/include",
32    "${sg_root_dir}/frameworks/common/log/include",
33    "${sg_root_dir}/frameworks/common/utils/include",
34    "${sg_root_dir}/services/config_manager/include",
35    "${sg_root_dir}/services/data_collect/store/include",
36    "${sg_root_dir}/services/risk_classify/model_manager",
37    "${sg_root_dir}/interfaces/inner_api/common/include",
38    "${sg_root_dir}/interfaces/inner_api/classify/include",
39    "${sg_root_dir}/frameworks/common/classify/include",
40  ]
41
42  sources = [
43    "${sg_root_dir}/services/risk_classify/model_manager/src/config_operate.cpp",
44    "${sg_root_dir}/services/risk_classify/model_manager/src/db_operate.cpp",
45    "${sg_root_dir}/services/risk_classify/model_manager/src/model_manager.cpp",
46    "${sg_root_dir}/services/risk_classify/model_manager/src/model_manager_impl.cpp",
47  ]
48
49  sanitize = {
50    integer_overflow = true
51    ubsan = true
52    boundary_sanitize = true
53    cfi = true
54    cfi_cross_dso = true
55    debug = false
56  }
57  branch_protector_ret = "pac_ret"
58
59  deps = [ "${sg_root_dir}/services/config_manager:sg_config_data_manager" ]
60
61  external_deps = [
62    "c_utils:utils",
63    "hilog:libhilog",
64    "json:nlohmann_json_static",
65    "ffrt:libffrt",
66  ]
67}
68