1# Copyright (c) 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("//foundation/ability/ability_runtime/ability_runtime.gni")
16import("../../js_environment.gni")
17
18config("js_environment_config") {
19  include_dirs = [ "${inner_api_path}" ]
20}
21
22config("public_js_environment_config") {
23  include_dirs = [
24    "${inner_api_path}",
25    "${utils_path}/include",
26    "${ability_runtime_services_path}/common/include",
27  ]
28}
29
30ohos_shared_library("js_environment") {
31  branch_protector_ret = "pac_ret"
32
33  sources = [
34    "${utils_path}/src/js_env_logger.cpp",
35    "src/js_environment.cpp",
36    "src/source_map.cpp",
37    "src/uncaught_exception_callback.cpp",
38  ]
39
40  configs = [
41    ":js_environment_config",
42    "${ark_compile_path}/ets_runtime:ark_jsruntime_public_config",
43  ]
44
45  public_configs = [ ":public_js_environment_config" ]
46
47  external_deps = [
48    "ace_engine:ace_uicontent",
49    "ets_runtime:libark_jsruntime",
50    "ets_utils:console",
51    "eventhandler:libeventhandler",
52    "faultloggerd:libunwinder",
53    "ffrt:libffrt",
54    "hilog:libhilog",
55    "napi:ace_napi",
56  ]
57
58  subsystem_name = "ability"
59  innerapi_tags = [ "platformsdk_indirect" ]
60  part_name = "ability_runtime"
61}
62