12b7e0694Sopenharmony_ci#Copyright (c) 2021 Huawei Device Co., Ltd. 22b7e0694Sopenharmony_ci#Licensed under the Apache License, Version 2.0 (the "License"); 32b7e0694Sopenharmony_ci#you may not use this file except in compliance with the License. 42b7e0694Sopenharmony_ci#You may obtain a copy of the License at 52b7e0694Sopenharmony_ci# 62b7e0694Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 72b7e0694Sopenharmony_ci# 82b7e0694Sopenharmony_ci#Unless required by applicable law or agreed to in writing, software 92b7e0694Sopenharmony_ci#distributed under the License is distributed on an "AS IS" BASIS, 102b7e0694Sopenharmony_ci#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 112b7e0694Sopenharmony_ci#See the License for the specific language governing permissions and 122b7e0694Sopenharmony_ci#limitations under the License. 132b7e0694Sopenharmony_ci 142b7e0694Sopenharmony_ciimport("//build/lite/config/component/lite_component.gni") 152b7e0694Sopenharmony_ci 162b7e0694Sopenharmony_ciace_common_root = "//foundation/arkui/ace_engine_lite/frameworks/common" 172b7e0694Sopenharmony_ciace_interface_root = 182b7e0694Sopenharmony_ci "//foundation/arkui/ace_engine_lite/interfaces/inner_api/builtin" 192b7e0694Sopenharmony_ciace_target_root = "//foundation/arkui/ace_engine_lite/frameworks/targets" 202b7e0694Sopenharmony_ci 212b7e0694Sopenharmony_cilite_component("ace_common_lite") { 222b7e0694Sopenharmony_ci features = [ ":ace_common" ] 232b7e0694Sopenharmony_ci} 242b7e0694Sopenharmony_ci 252b7e0694Sopenharmony_cilite_library("ace_common") { 262b7e0694Sopenharmony_ci if (ohos_kernel_type == "liteos_m") { 272b7e0694Sopenharmony_ci target_type = "static_library" 282b7e0694Sopenharmony_ci } else { 292b7e0694Sopenharmony_ci target_type = "shared_library" 302b7e0694Sopenharmony_ci } 312b7e0694Sopenharmony_ci 322b7e0694Sopenharmony_ci include_dirs = [ 332b7e0694Sopenharmony_ci "$ace_common_root/log", 342b7e0694Sopenharmony_ci "$ace_common_root/memory", 352b7e0694Sopenharmony_ci "$ace_common_root/memory/cache", 362b7e0694Sopenharmony_ci "$ace_common_root/utils", 372b7e0694Sopenharmony_ci "$ace_interface_root/base", 382b7e0694Sopenharmony_ci "//base/hiviewdfx/hilog_lite/interfaces/native/kits", 392b7e0694Sopenharmony_ci "//third_party/bounds_checking_function/include", 402b7e0694Sopenharmony_ci ] 412b7e0694Sopenharmony_ci if (defined(board_toolchain_type) && board_toolchain_type == "iccarm") { 422b7e0694Sopenharmony_ci cflags = [ 432b7e0694Sopenharmony_ci "--diag_suppress", 442b7e0694Sopenharmony_ci "Pa137,Pe226", 452b7e0694Sopenharmony_ci ] 462b7e0694Sopenharmony_ci cflags_cc = cflags 472b7e0694Sopenharmony_ci } 482b7e0694Sopenharmony_ci sources = [ 492b7e0694Sopenharmony_ci "$ace_common_root/log/ace_log.cpp", 502b7e0694Sopenharmony_ci "$ace_common_root/memory/ace_mem_base.cpp", 512b7e0694Sopenharmony_ci "$ace_common_root/memory/cache/cache_manager.cpp", 522b7e0694Sopenharmony_ci "$ace_common_root/memory/mem_proc.cpp", 532b7e0694Sopenharmony_ci "$ace_common_root/memory/memory_heap.cpp", 542b7e0694Sopenharmony_ci ] 552b7e0694Sopenharmony_ci 562b7e0694Sopenharmony_ci if (ohos_kernel_type == "liteos_m") { 572b7e0694Sopenharmony_ci deps = [ "//third_party/bounds_checking_function:libsec_static" ] 582b7e0694Sopenharmony_ci } else { 592b7e0694Sopenharmony_ci deps = [ "//third_party/bounds_checking_function:libsec_shared" ] 602b7e0694Sopenharmony_ci } 612b7e0694Sopenharmony_ci deps += [ "$ace_target_root" ] 622b7e0694Sopenharmony_ci} 63