# Copyright (c) 2022-2023 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/ohos.gni") import("../cgroup_sched.gni") config("cgroup_sched_public_config") { include_dirs = [ "../common/include", "../interfaces/innerkits/include", "./utils/include", "process_group/include", "sched_controller/include", ] } ohos_shared_library("cgroup_sched") { public_configs = [ ":cgroup_sched_public_config" ] sources = [ "${cgroup_sched_common}/cgroup_sched_log.cpp", "sched_controller/app_startup_scene_rec.cpp", "sched_controller/app_state_observer.cpp", "sched_controller/cgroup_adjuster.cpp", "sched_controller/cgroup_event_handler.cpp", "sched_controller/sched_controller.cpp", "sched_controller/supervisor.cpp", "sched_controller/window_state_observer.cpp", "utils/ressched_utils.cpp", ] deps = [ "${ressched_interfaces}/innerkits/ressched_client:ressched_client", "${ressched_services_executor}/interfaces/innerkits/ressched_executor_client:resschedexe_client", "./process_group:libprocess_group", ] external_deps = [ "ability_runtime:app_manager", "ability_runtime:wantagent_innerkits", "bundle_framework:appexecfwk_core", "c_utils:utils", "common_event_service:cesfwk_innerkits", "eventhandler:libeventhandler", "ffrt:libffrt", "hilog:libhilog", "hisysevent:libhisysevent", "hitrace:hitrace_meter", "ipc:ipc_single", "samgr:samgr_proxy", "window_manager:libwm_lite", "window_manager:libwmutil_base", ] defines = [] if (has_bg_task_mgr) { defines += [ "CONFIG_BGTASK_MGR" ] sources += [ "sched_controller/background_task_observer.cpp" ] external_deps += [ "background_task_mgr:bgtaskmgr_innerkits" ] } if (cgroup_ressched_power_manager_enable) { external_deps += [ "power_manager:powermgr_client" ] defines += [ "POWER_MANAGER_ENABLE" ] } sanitize = { cfi = true cfi_cross_dso = true debug = false } branch_protector_ret = "pac_ret" part_name = "resource_schedule_service" subsystem_name = "resourceschedule" }