1#Copyright (c) 2021 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/lite/config/component/lite_component.gni") 15import("//foundation/arkui/ace_engine_lite/ace_lite.gni") 16 17ace_frameworks_root = "//foundation/arkui/ace_engine_lite/frameworks" 18ace_interface_root = 19 "//foundation/arkui/ace_engine_lite/interfaces/inner_api/builtin" 20ace_target_root = "//foundation/arkui/ace_engine_lite/frameworks/targets" 21 22lite_component("ace_module_manager_lite") { 23 features = [ ":ace_module_manager" ] 24} 25 26lite_library("ace_module_manager") { 27 if (ohos_kernel_type == "liteos_m") { 28 target_type = "static_library" 29 } else { 30 target_type = "shared_library" 31 cflags = [ "-Wall" ] 32 cflags_cc = cflags 33 } 34 35 include_dirs = [ 36 "$ace_frameworks_root/common/log", 37 "$ace_frameworks_root/common/utils", 38 "$ace_frameworks_root/include/base", 39 "$ace_frameworks_root/native_engine/jsi", 40 "$ace_interface_root/base", 41 "$ace_interface_root/jsi", 42 "//base/hiviewdfx/hilog_lite/interfaces/native/kits", 43 "//third_party/jerryscript/jerry-core/include", 44 "//third_party/bounds_checking_function/include", 45 ] 46 deps = [ "$ace_target_root" ] 47 48 sources = [ "$ace_frameworks_root/module_manager/module_manager.cpp" ] 49 50 public_deps = [ 51 "$ace_frameworks_root/common:ace_common_lite", 52 "$ace_frameworks_root/native_engine:ace_native_engine_lite", 53 "//commonlibrary/utils_lite/js/builtin:ace_utils_kits", 54 ] 55 56 defines = ace_lite_common_defines 57 58 if (ohos_kernel_type == "liteos_m") { 59 public_deps += [ 60 "//foundation/arkui/ui_lite:ui", 61 "//third_party/bounds_checking_function:libsec_static", 62 "//third_party/jerryscript:jerry_engine", 63 ] 64 if (defined(board_toolchain_type) && board_toolchain_type == "iccarm") { 65 public_deps -= [ "//commonlibrary/utils_lite/js/builtin:ace_utils_kits" ] 66 cflags = [ 67 "--diag_suppress", 68 "Pa137,Pe226", 69 ] 70 cflags_cc = cflags 71 } 72 if (defined(global_parts_info.security_huks)) { 73 defines += [ "ENABLE_HUKS_ACE_LITE_FEATURE" ] 74 } 75 } else { 76 public_deps += [ 77 "${appexecfwk_lite_path}/interfaces/kits/bundle_lite/js/builtin:capability_api", 78 "//base/hiviewdfx/hilog_lite/frameworks/js/builtin:ace_kit_hilog", 79 "//base/security/huks/frameworks/crypto_lite/js/builtin:ace_kit_cipher", 80 "//foundation/communication/netstack/frameworks/js/builtin:http_lite_shared", 81 "//test/xts/device_attest_lite/interfaces/kit/js:kit_device_attest", 82 "//third_party/bounds_checking_function:libsec_shared", 83 "//third_party/jerryscript/jerry-core:jerry-core_shared", 84 ] 85 86 if (ace_engine_lite_battery_lite_enable) { 87 public_deps += 88 [ "//base/powermgr/battery_lite/frameworks/js:ace_battery_kits" ] 89 } 90 91 if (ace_engine_lite_media_lite_enable) { 92 public_deps += [ "//foundation/multimedia/media_lite/interfaces/kits/player_lite/js/builtin:audio_lite_api" ] 93 } 94 } 95} 96