1# Copyright (c) 2022 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
14napi_path = "//foundation//arkui/napi"
15ets_runtime_path = "//arkcompiler/ets_runtime"
16
17napi_sources = [
18  "callback_scope_manager/native_callback_scope_manager.cpp",
19  "module_manager/module_checker_delegate.cpp",
20  "module_manager/module_load_checker.cpp",
21  "module_manager/native_module_manager.cpp",
22  "native_engine/impl/ark/ark_idle_monitor.cpp",
23  "native_engine/impl/ark/ark_native_deferred.cpp",
24  "native_engine/impl/ark/ark_native_engine.cpp",
25  "native_engine/impl/ark/ark_native_reference.cpp",
26  "native_engine/native_api.cpp",
27  "native_engine/native_async_work.cpp",
28  "native_engine/native_create_env.cpp",
29  "native_engine/native_engine.cpp",
30  "native_engine/native_node_api.cpp",
31  "native_engine/native_safe_async_work.cpp",
32  "native_engine/native_sendable.cpp",
33  "reference_manager/native_reference_manager.cpp",
34  "utils/log.cpp",
35]
36
37if (is_mingw) {
38  napi_sources += [ "utils/platform/windows/file.cpp" ]
39} else {
40  napi_sources += [ "utils/platform/unix_like/file.cpp" ]
41}
42
43declare_args() {
44  napi_enable_container_scope = false
45  napi_enable_memleak_debug = true
46
47  # Enable pgo for building
48  napi_feature_enable_pgo = false
49
50  # Set pgo profdata path
51  napi_feature_pgo_path = ""
52}
53
54is_ohos_standard_system = is_standard_system && !is_arkui_x
55
56module_output_path = "arkcompiler/napi"
57