1ba5c3796Sopenharmony_ci# Copyright (c) 2022 Huawei Device Co., Ltd. 2ba5c3796Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 3ba5c3796Sopenharmony_ci# you may not use this file except in compliance with the License. 4ba5c3796Sopenharmony_ci# You may obtain a copy of the License at 5ba5c3796Sopenharmony_ci# 6ba5c3796Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 7ba5c3796Sopenharmony_ci# 8ba5c3796Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 9ba5c3796Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 10ba5c3796Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11ba5c3796Sopenharmony_ci# See the License for the specific language governing permissions and 12ba5c3796Sopenharmony_ci# limitations under the License. 13ba5c3796Sopenharmony_ci 14ba5c3796Sopenharmony_ciimport("//build/ohos.gni") 15ba5c3796Sopenharmony_ciimport("//build/ohos_var.gni") 16ba5c3796Sopenharmony_ciimport("../../memmgr.gni") 17ba5c3796Sopenharmony_ci 18ba5c3796Sopenharmony_ciconfig("memmgr_client_config") { 19ba5c3796Sopenharmony_ci visibility = [ ":*" ] 20ba5c3796Sopenharmony_ci include_dirs = [ 21ba5c3796Sopenharmony_ci "include", 22ba5c3796Sopenharmony_ci "${memmgr_common_path}/include", 23ba5c3796Sopenharmony_ci "${memmgr_service_path}/include/memory_level_manager/", 24ba5c3796Sopenharmony_ci ] 25ba5c3796Sopenharmony_ci defines = [] 26ba5c3796Sopenharmony_ci if (memmgr_purgeable_memory) { 27ba5c3796Sopenharmony_ci defines += [ "USE_PURGEABLE_MEMORY" ] 28ba5c3796Sopenharmony_ci include_dirs += [ "${memmgr_service_path}/include/purgeable_mem_manager/" ] 29ba5c3796Sopenharmony_ci } 30ba5c3796Sopenharmony_ci} 31ba5c3796Sopenharmony_ci 32ba5c3796Sopenharmony_ciohos_shared_library("memmgrclient") { 33ba5c3796Sopenharmony_ci install_enable = true 34ba5c3796Sopenharmony_ci sources = [ 35ba5c3796Sopenharmony_ci "src/app_state_subscriber.cpp", 36ba5c3796Sopenharmony_ci "src/bundle_priority_list.cpp", 37ba5c3796Sopenharmony_ci "src/mem_mgr_client.cpp", 38ba5c3796Sopenharmony_ci "src/mem_mgr_constant.cpp", 39ba5c3796Sopenharmony_ci "src/mem_mgr_process_state_info.cpp", 40ba5c3796Sopenharmony_ci "src/mem_mgr_proxy.cpp", 41ba5c3796Sopenharmony_ci "src/mem_mgr_window_info.cpp", 42ba5c3796Sopenharmony_ci ] 43ba5c3796Sopenharmony_ci 44ba5c3796Sopenharmony_ci public_configs = [ ":memmgr_client_config" ] 45ba5c3796Sopenharmony_ci 46ba5c3796Sopenharmony_ci external_deps = [ 47ba5c3796Sopenharmony_ci "c_utils:utils", 48ba5c3796Sopenharmony_ci "hilog:libhilog", 49ba5c3796Sopenharmony_ci "ipc:ipc_core", 50ba5c3796Sopenharmony_ci "samgr:samgr_proxy", 51ba5c3796Sopenharmony_ci ] 52ba5c3796Sopenharmony_ci 53ba5c3796Sopenharmony_ci if (memmgr_purgeable_memory) { 54ba5c3796Sopenharmony_ci sources += [ 55ba5c3796Sopenharmony_ci "${memmgr_service_path}/src/purgeable_mem_manager/app_state_subscriber_proxy.cpp", 56ba5c3796Sopenharmony_ci "${memmgr_service_path}/src/purgeable_mem_manager/app_state_subscriber_stub.cpp", 57ba5c3796Sopenharmony_ci ] 58ba5c3796Sopenharmony_ci } 59ba5c3796Sopenharmony_ci 60ba5c3796Sopenharmony_ci sanitize = { 61ba5c3796Sopenharmony_ci cfi = true 62ba5c3796Sopenharmony_ci cfi_cross_dso = true 63ba5c3796Sopenharmony_ci debug = false 64ba5c3796Sopenharmony_ci } 65ba5c3796Sopenharmony_ci branch_protector_ret = "pac_ret" 66ba5c3796Sopenharmony_ci 67ba5c3796Sopenharmony_ci part_name = "memmgr" 68ba5c3796Sopenharmony_ci subsystem_name = "resourceschedule" 69ba5c3796Sopenharmony_ci} 70