• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2024 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("../../../app_domain_verify.gni")
16config("app_domain_verify_mgr_napi_config") {
17  visibility = [ ":*" ]
18  include_dirs = [
19    "include",
20    "${app_domain_verify_client_path}/include",
21    "${app_domain_verify_common_path}/include",
22    "${app_domain_verify_common_path}/include/zidl",
23  ]
24  configs = [ "//build/config/compiler:exceptions" ]
25  ldflags = [ "-Wl,--exclude-libs=ALL" ]
26  cflags = [
27    "-fvisibility=hidden",
28    "-fdata-sections",
29    "-ffunction-sections",
30    "-fstack-protector-strong",
31    "-D_FORTIFY_SOURCE=2",
32    "-Os",
33  ]
34
35  cflags_cc = [
36    "-fvisibility-inlines-hidden",
37    "-Os",
38  ]
39}
40
41ohos_shared_library("appdomainverify_napi") {
42  branch_protector_ret = "pac_ret"
43
44  sanitize = {
45    boundary_sanitize = true
46    cfi = true
47    cfi_cross_dso = true
48    debug = false
49    integer_overflow = true
50    ubsan = true
51  }
52
53  sources = [
54    "src/api_event_reporter.cpp",
55    "src/app_domain_verify_manager_napi.cpp",
56    "src/config_parser.cpp",
57    "src/native_module.cpp",
58  ]
59  public_configs = [ ":app_domain_verify_mgr_napi_config" ]
60  deps = [
61    "${app_domain_verify_client_path}:app_domain_verify_mgr_client",
62    "${app_domain_verify_common_path}:app_domain_verify_common",
63  ]
64  external_deps = [
65    "ability_base:want",
66    "bundle_framework:appexecfwk_base",
67    "c_utils:utils",
68    "hiappevent:hiappevent_innerapi",
69    "hilog:libhilog",
70    "ipc:ipc_core",
71    "napi:ace_napi",
72    "safwk:system_ability_fwk",
73    "samgr:samgr_proxy",
74  ]
75  defines = []
76  if (build_variant == "user") {
77    defines += [ "IS_RELEASE_VERSION" ]
78  }
79
80  relative_install_dir = "module/bundle"
81  subsystem_name = "bundlemanager"
82  part_name = "app_domain_verify"
83}
84