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/impl/ark/ark_native_timer.cpp", 27 "native_engine/impl/ark/cj_support.cpp", 28 "native_engine/native_api.cpp", 29 "native_engine/native_async_work.cpp", 30 "native_engine/native_create_env.cpp", 31 "native_engine/native_engine.cpp", 32 "native_engine/native_event.cpp", 33 "native_engine/native_node_api.cpp", 34 "native_engine/native_safe_async_work.cpp", 35 "native_engine/native_sendable.cpp", 36 "native_engine/worker_manager.cpp", 37 "reference_manager/native_reference_manager.cpp", 38 "utils/log.cpp", 39] 40 41if (is_mingw) { 42 napi_sources += [ "utils/platform/windows/file.cpp" ] 43} else { 44 napi_sources += [ "utils/platform/unix_like/file.cpp" ] 45} 46 47declare_args() { 48 napi_enable_container_scope = false 49 napi_enable_memleak_debug = true 50 51 # Enable pgo for building 52 napi_feature_enable_pgo = false 53 54 # Set pgo profdata path 55 napi_feature_pgo_path = "" 56 57 # Enable PAC(Pointer Authentication Code) feature 58 napi_enable_data_protector = false 59 enabled_data_protector = false 60} 61 62if (defined(target_cpu) && target_cpu == "arm64" && 63 napi_enable_data_protector && !is_emulator) { 64 enabled_data_protector = true 65} 66 67is_ohos_standard_system = is_standard_system && !is_arkui_x 68 69module_output_path = "arkcompiler/napi" 70 71if (!defined(ark_standalone_build)) { 72 ark_standalone_build = false 73} 74