• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022-2025 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/ohos.gni")
15
16config("concurrent_task_config") {
17  visibility = [ ":*" ]
18  cflags_cc = [ "-fexceptions" ]
19  cflags = [
20    "-fstack-protector-strong",
21    "-Wno-shift-negative-value",
22  ]
23  include_dirs = [
24    "include",
25    "../include",
26    "../frameworks/concurrent_task_client/include/",
27    "../interfaces/inner_api/",
28    "../common/include/",
29  ]
30}
31
32ohos_shared_library("concurrentsvc") {
33  public_configs = [ ":concurrent_task_config" ]
34  branch_protector_ret = "pac_ret"
35  sanitize = {
36    cfi = true
37    cfi_cross_dso = true
38    cfi_no_nvcall = true
39    cfi_vcall_ical_only = true
40    debug = false
41  }
42
43  cflags_cc = [
44    "-fomit-frame-pointer",
45    "-fdata-sections",
46    "-ffunction-sections",
47    "-fno-unroll-loops",
48    "-fno-exceptions",
49    "-fno-unwind-tables",
50    "-fno-asynchronous-unwind-tables",
51    "-Os",
52  ]
53
54  ldflags = [ "-Wl,--exclude-libs=ALL" ]
55  sources = [
56    "../common/src/concurrent_task_utils.cpp",
57    "src/concurrent_task_controller_interface.cpp",
58    "src/concurrent_task_service.cpp",
59    "src/concurrent_task_service_ability.cpp",
60    "src/func_loader.cpp",
61    "src/qos_interface.cpp",
62    "src/qos_policy.cpp",
63  ]
64
65  deps = [
66    "../etc/param:ffrt_etc",
67    "../frameworks/concurrent_task_client/:concurrent_task_idl",
68  ]
69
70  if (defined(
71      global_parts_info.hmosresourceschedule_frame_aware_sched_override)) {
72    defines = [ "QOS_EXT_ENABLE" ]
73  }
74
75  external_deps = [
76    "access_token:libaccesstoken_sdk",
77    "c_utils:utils",
78    "config_policy:configpolicy_util",
79    "frame_aware_sched:rtg_interface",
80    "hilog:libhilog",
81    "hitrace:hitrace_meter",
82    "init:libbegetutil",
83    "ipc:ipc_single",
84    "libxml2:libxml2",
85    "safwk:system_ability_fwk",
86    "samgr:samgr_proxy",
87  ]
88
89  subsystem_name = "resourceschedule"
90  part_name = "qos_manager"
91}
92