• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2021-2022 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
16config("huks_config") {
17  include_dirs = [
18    "include",
19    "//base/security/huks/interfaces/innerkits/huks_standard/main/include",
20  ]
21}
22
23ohos_static_library("libhuks_common_standard_static") {
24  sanitize = {
25    integer_overflow = true
26    cfi = true
27    debug = false
28  }
29  subsystem_name = "security"
30  part_name = "huks"
31  defines = [
32    "L2_STANDARD",
33    "_HARDWARE_ROOT_KEY_",
34    "_HUKS_LOG_ENABLE_",
35  ]
36  public_configs =
37      [ ":huks_config" ]  # Share include files for other gn when deps.
38
39  configs = [ "//base/security/huks/frameworks/config/build:coverage_flag" ]
40
41  include_dirs = [
42    "//third_party/bounds_checking_function/include",
43    "//base/security/huks/interfaces/innerkits/huks_standard/main/include",
44  ]
45
46  sources = [
47    "src/hks_ability.c",
48    "src/hks_base_check.c",
49    "src/hks_check_paramset.c",
50    "src/hks_common_check.c",
51    "src/hks_crypto_adapter.c",
52    "src/hks_errcode_adapter.c",
53    "src/hks_param.c",
54  ]
55
56  external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
57
58  cflags = [
59    "-DHILOG_ENABLE",
60    "-Wall",
61    "-Werror",
62  ]
63  complete_static_lib = true
64}
65