• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2025 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/access_token/access_token.gni")
15import("//build/config/components/ets_frontend/ets2abc_config.gni")
16import("//build/ohos.gni")
17import("//build/ohos/ace/ace.gni")
18
19ohos_shared_library("privacy_ani") {
20  sanitize = {
21    cfi = true
22    cfi_cross_dso = true
23    debug = false
24  }
25
26  cflags_cc = [ "-DHILOG_ENABLE" ]
27  include_dirs = [
28    "${access_token_path}/frameworks/common/include",
29    "${access_token_path}/interfaces/innerkits/accesstoken/include",
30    "${access_token_path}/interfaces/innerkits/privacy/include",
31    "${access_token_path}/frameworks/ets/ani/common/include",
32    "${access_token_path}/frameworks/ets/ani/privacy/include",
33  ]
34  sources = [ "src/privacy_manager.cpp" ]
35
36  deps = [
37    "${access_token_path}/frameworks/common:accesstoken_common_cxx",
38    "${access_token_path}/frameworks/ets/ani/common:libani_common",
39    "${access_token_path}/interfaces/innerkits/privacy:libprivacy_sdk",
40  ]
41
42  external_deps = [
43    "hilog:libhilog",
44    "ipc:ipc_single",
45    "runtime_core:ani",
46    "runtime_core:libarkruntime",
47  ]
48
49  part_name = "access_token"
50  subsystem_name = "security"
51}
52
53generate_static_abc("privacy_manager") {
54  base_url = "./ets"
55  files = [ "./ets/@ohos.privacyManager.ets" ]
56
57  is_boot_abc = "True"
58  device_dst_file = "/system/framework/privacy_manager.abc"
59}
60
61ohos_prebuilt_etc("privacy_manager_etc") {
62  source = "$target_out_dir/privacy_manager.abc"
63  deps = [ ":privacy_manager" ]
64  module_install_dir = "framework"
65
66  part_name = "access_token"
67  subsystem_name = "security"
68}
69
70group("privacy_ets") {
71  deps = [
72    ":privacy_ani",
73    ":privacy_manager_etc",
74  ]
75}
76