1# Copyright (C) 2021-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/huks/build/config.gni")
15import("//build/ohos.gni")
16
17ohos_prebuilt_etc("huks_service.rc") {
18  source = "huks_service.cfg"
19  relative_install_dir = "init"
20  subsystem_name = "security"
21  part_name = "huks"
22}
23
24ohos_shared_library("huks_service") {
25  branch_protector_ret = "pac_ret"
26  sanitize = {
27    integer_overflow = true
28    cfi = true
29    debug = false
30    cfi_cross_dso = true
31    boundary_sanitize = true
32    ubsan = true
33  }
34  subsystem_name = "security"
35  part_name = "huks"
36  version_script = "libhuksservice.map"
37
38  configs = [
39    "//base/security/huks/frameworks/config/build:l2_standard_common_config",
40  ]
41  deps = [
42    ":huks_service.rc",
43    "//base/security/huks/services/huks_standard/huks_service/main:libhuks_service_standard_static",
44  ]
45  external_deps = [
46    "hilog:libhilog",
47    "ipc:ipc_single",
48    "samgr:samgr_proxy",
49  ]
50}
51