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