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/subsystem/aafwk/config.gni") 15import("//build/ohos.gni") 16import("//foundation/arkui/ace_engine_lite/ace_lite.gni") 17 18declare_args() { 19 LOSCFG_TEST_JS_BUILD = false 20} 21 22config("ace_lite_config") { 23 include_dirs = ace_lite_include_dirs_simulator 24 include_dirs += ace_lite_include_dirs 25 include_dirs += 26 [ "//foundation/arkui/ace_engine_lite/frameworks/targets/simulator" ] 27} 28 29ohos_static_library("ace_lite") { 30 public_configs = [ ":ace_lite_config" ] 31 sources = ace_lite_sources 32 sources += [ 33 "$ACE_LITE_COMMON_PATH/log/ace_log.cpp", 34 "$ACE_LITE_COMMON_PATH/memory/ace_mem_base.cpp", 35 "$ACE_LITE_COMMON_PATH/memory/cache/cache_manager.cpp", 36 "$ACE_LITE_COMMON_PATH/memory/mem_proc.cpp", 37 "$ACE_LITE_COMMON_PATH/memory/memory_heap.cpp", 38 "$MODULE_MANAGER_PATH/module_manager.cpp", 39 "$NATIVE_ENGINE_PATH/jsi/jsi.cpp", 40 "//foundation/arkui/ace_engine_lite/frameworks/src/core/modules/presets/feature_ability_module.cpp", 41 ] 42 sources -= [ "//foundation/arkui/ace_engine_lite/frameworks/src/core/context/ace_ability.cpp" ] 43 cflags_cc = [ 44 "-D_INC_STRING_S", 45 "-D_INC_WCHAR_S", 46 "-D_SECIMP=//", 47 "-D_STDIO_S_DEFINED", 48 "-D_INC_STDIO_S", 49 "-D_INC_STDLIB_S", 50 "-D_INC_MEMORY_S", 51 ] 52 deps = [ 53 "//base/global/resource_management_lite/frameworks/resmgr_lite:global_resmgr_simulator", 54 "//foundation/graphic/ui/ext/ide:ui_ide", 55 "//third_party/bounds_checking_function:libsec_static", 56 "//third_party/jerryscript:libjerryscript", 57 ] 58 defines = [ 59 "TARGET_SIMULATOR=1", 60 "JS_ENGINE_EXTERNAL_CONTEXT=1", 61 "SCREENSIZE_SPECIFIED=1", 62 "MOCK_JS_ASYNC_WORK=1", 63 ] 64 if (is_debug == "debug") { 65 defines += [ "JS_PROFILER=1" ] 66 } else { 67 defines += [ "JS_PROFILER=0" ] 68 } 69 if (LOSCFG_TEST_JS_BUILD) { 70 defines += [ "JSFWK_TEST=1" ] 71 } 72 if (enable_ohos_appexecfwk_feature_ability == true) { 73 defines += [ "ABILITY_WINDOW_SUPPORT" ] 74 } 75} 76