• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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("//build/ohos.gni")
15import("../../../access_token.gni")
16
17ohos_shared_library("accesstoken_database_cxx") {
18  subsystem_name = "security"
19  part_name = "access_token"
20
21  include_dirs = [
22    "include",
23    "${access_token_path}/frameworks/common/include",
24  ]
25
26  sources = [
27    "src/generic_values.cpp",
28    "src/memory_guard.cpp",
29    "src/sqlite_helper.cpp",
30    "src/statement.cpp",
31    "src/variant_value.cpp",
32  ]
33
34  cflags_cc = [ "-DHILOG_ENABLE" ]
35  configs = [ "${access_token_path}/config:coverage_flags" ]
36
37  deps = [ "//third_party/sqlite:sqlite" ]
38
39  external_deps = [ "hilog:libhilog" ]
40
41  if (use_musl) {
42    if (use_jemalloc && use_jemalloc_dfx_intf) {
43      cflags_cc += [ "-DCONFIG_USE_JEMALLOC_DFX_INTF" ]
44    }
45  }
46}
47