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("//foundation/ability/ability_runtime/ability_runtime.gni")
16
17ohos_shared_library("application_napi") {
18  sanitize = {
19    integer_overflow = true
20    ubsan = true
21    boundary_sanitize = true
22    cfi = true
23    cfi_cross_dso = true
24    cfi_vcall_icall_only = true
25    debug = false
26  }
27  branch_protector_ret = "pac_ret"
28
29  include_dirs = [
30    "./",
31    "${ability_runtime_napi_path}/ability_auto_startup_callback",
32    "${ability_runtime_path}/interfaces/kits/native/appkit/ability_runtime/context",
33  ]
34
35  sources = [
36    "application_module.cpp",
37    "js_application.cpp",
38  ]
39
40  configs = [ "${ability_runtime_services_path}/common:common_config" ]
41
42  deps = [
43    "${ability_runtime_innerkits_path}/error_utils:ability_runtime_error_util",
44    "${ability_runtime_innerkits_path}/napi_base_context:napi_base_context",
45    "${ability_runtime_innerkits_path}/runtime:runtime",
46    "${ability_runtime_napi_path}/inner/napi_common:napi_common",
47    "${ability_runtime_native_path}/appkit:app_context",
48    "${ability_runtime_native_path}/appkit:app_context_utils",
49  ]
50
51  external_deps = [
52    "ability_base:session_info",
53    "ability_base:want",
54    "access_token:libaccesstoken_sdk",
55    "access_token:libtokenid_sdk",
56    "c_utils:utils",
57    "hilog:libhilog",
58    "ipc:ipc_core",
59    "napi:ace_napi",
60  ]
61
62  relative_install_dir = "module/app/ability"
63  subsystem_name = "ability"
64  part_name = "ability_runtime"
65}
66