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
17config("accesstoken_ndk_config") {
18  include_dirs = [ "include" ]
19}
20
21ohos_shared_library("libability_access_control") {
22  innerapi_tags = [ "ndk" ]
23  output_extension = "so"
24  public_configs = [ ":accesstoken_ndk_config" ]
25
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
35  sources = [ "src/ability_access_control.cpp" ]
36
37  deps = [
38    "${access_token_path}/interfaces/innerkits/accesstoken:libaccesstoken_sdk",
39    "${access_token_path}/interfaces/innerkits/token_setproc:libtokensetproc_shared",
40  ]
41
42  cflags_cc = [
43    "-Wall",
44    "-Werror",
45  ]
46
47  part_name = "access_token"
48  subsystem_name = "security"
49}
50