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_common_root = "//foundation/arkui/ace_engine_lite/frameworks/common" 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_common_lite") { 22 features = [ ":ace_common" ] 23} 24 25lite_library("ace_common") { 26 if (ohos_kernel_type == "liteos_m") { 27 target_type = "static_library" 28 } else { 29 target_type = "shared_library" 30 } 31 32 include_dirs = [ 33 "$ace_common_root/log", 34 "$ace_common_root/memory", 35 "$ace_common_root/memory/cache", 36 "$ace_common_root/utils", 37 "$ace_interface_root/base", 38 "//base/hiviewdfx/hilog_lite/interfaces/native/kits", 39 "//third_party/bounds_checking_function/include", 40 ] 41 if (defined(board_toolchain_type) && board_toolchain_type == "iccarm") { 42 cflags = [ 43 "--diag_suppress", 44 "Pa137,Pe226", 45 ] 46 cflags_cc = cflags 47 } 48 sources = [ 49 "$ace_common_root/log/ace_log.cpp", 50 "$ace_common_root/memory/ace_mem_base.cpp", 51 "$ace_common_root/memory/cache/cache_manager.cpp", 52 "$ace_common_root/memory/mem_proc.cpp", 53 "$ace_common_root/memory/memory_heap.cpp", 54 ] 55 56 if (ohos_kernel_type == "liteos_m") { 57 deps = [ "//third_party/bounds_checking_function:libsec_static" ] 58 } else { 59 deps = [ "//third_party/bounds_checking_function:libsec_shared" ] 60 } 61 deps += [ "$ace_target_root" ] 62} 63