blob: d623a1152e4a531a4898bc816eb84cc96f026da3 [file] [log] [blame]
Bob Badourd69ad692021-02-16 19:02:14 -08001package {
2 default_applicable_licenses: ["Android-Apache-2.0"],
3}
4
T.J. Mercierf8901762024-03-05 21:55:15 +00005soong_config_module_type {
6 name: "libprocessgroup_flag_aware_cc_defaults",
7 module_type: "cc_defaults",
8 config_namespace: "ANDROID",
9 bool_variables: [
10 "memcg_v2_force_enabled",
T.J. Mercier1cfa2c42024-04-08 21:14:32 +000011 "cgroup_v2_sys_app_isolation",
T.J. Mercierf8901762024-03-05 21:55:15 +000012 ],
13 properties: [
14 "cflags",
15 ],
16}
17
18libprocessgroup_flag_aware_cc_defaults {
19 name: "libprocessgroup_build_flags_cc",
T.J. Merciera09ee8e2024-10-08 23:41:27 +000020 cpp_std: "gnu++23",
T.J. Mercierf8901762024-03-05 21:55:15 +000021 soong_config_variables: {
22 memcg_v2_force_enabled: {
23 cflags: [
24 "-DMEMCG_V2_FORCE_ENABLED=true",
25 ],
26 },
T.J. Mercier1cfa2c42024-04-08 21:14:32 +000027 cgroup_v2_sys_app_isolation: {
28 cflags: [
29 "-DCGROUP_V2_SYS_APP_ISOLATION=true",
30 ],
31 },
T.J. Mercierf8901762024-03-05 21:55:15 +000032 },
Bart Van Asschea823bee2022-08-08 11:12:55 -070033}
34
Suren Baghdasaryan1bd127b2019-01-25 05:30:52 +000035cc_library_headers {
36 name: "libprocessgroup_headers",
37 vendor_available: true,
Justin Yunfeef4d32020-11-11 19:17:40 +090038 product_available: true,
Yifan Hong67c71a12020-10-28 10:49:35 -070039 ramdisk_available: true,
40 vendor_ramdisk_available: true,
Suren Baghdasaryan1bd127b2019-01-25 05:30:52 +000041 recovery_available: true,
42 host_supported: true,
dimitry49c1f6e2019-05-16 14:19:09 +020043 native_bridge_supported: true,
Suren Baghdasaryan1bd127b2019-01-25 05:30:52 +000044 export_include_dirs: ["include"],
45 target: {
46 linux_bionic: {
47 enabled: true,
48 },
49 windows: {
50 enabled: true,
51 },
52 },
Jiyong Parke3d371e2020-04-08 22:37:42 +090053 apex_available: [
54 "//apex_available:platform",
55 "//apex_available:anyapex",
56 ],
Jooyung Han4f55f3e2020-04-16 18:48:33 +090057 min_sdk_version: "29",
Suren Baghdasaryan1bd127b2019-01-25 05:30:52 +000058}
59
Steven Moreland419ce362017-04-19 14:12:52 -070060cc_library {
Suren Baghdasaryan1bd127b2019-01-25 05:30:52 +000061 srcs: [
Suren Baghdasaryan82b72a52018-12-21 11:41:50 -080062 "cgroup_map.cpp",
Suren Baghdasaryan1bd127b2019-01-25 05:30:52 +000063 "processgroup.cpp",
64 "sched_policy.cpp",
Suren Baghdasaryan82b72a52018-12-21 11:41:50 -080065 "task_profiles.cpp",
Suren Baghdasaryan1bd127b2019-01-25 05:30:52 +000066 ],
Steven Moreland419ce362017-04-19 14:12:52 -070067 name: "libprocessgroup",
Tom Cherry574a0812018-02-23 13:04:40 -080068 host_supported: true,
Steven Morelandb495b0d2019-06-17 12:44:39 -070069 native_bridge_supported: true,
Yifan Hong89d1c192020-10-21 18:07:28 -070070 ramdisk_available: true,
71 vendor_ramdisk_available: true,
Tom Cherry1151d152018-07-24 13:45:09 -070072 recovery_available: true,
Suren Baghdasaryan7bf43812019-01-25 05:29:55 +000073 vendor_available: true,
Justin Yunfeef4d32020-11-11 19:17:40 +090074 product_available: true,
Kiyoung Kimad8cf522024-03-11 13:04:38 +090075 double_loadable: true,
Suren Baghdasaryan94910782019-01-25 05:32:52 +000076 shared_libs: [
77 "libbase",
Priyanka Advani (xWF)691ad732024-10-08 18:54:37 +000078 "libcgrouprc",
Vic Yangd167cb22019-05-08 12:50:56 -070079 ],
80 static_libs: [
Suren Baghdasaryan82b72a52018-12-21 11:41:50 -080081 "libjsoncpp",
T.J. Mercierae0b2902024-08-05 18:18:35 +000082 "libprocessgroup_util",
Suren Baghdasaryan94910782019-01-25 05:32:52 +000083 ],
Suren Baghdasaryan7bf43812019-01-25 05:29:55 +000084 // for cutils/android_filesystem_config.h
Suren Baghdasaryan1bd127b2019-01-25 05:30:52 +000085 header_libs: [
86 "libcutils_headers",
87 "libprocessgroup_headers",
88 ],
Steven Moreland419ce362017-04-19 14:12:52 -070089 export_include_dirs: ["include"],
Suren Baghdasaryan1bd127b2019-01-25 05:30:52 +000090 export_header_lib_headers: [
91 "libprocessgroup_headers",
92 ],
T.J. Mercierf8901762024-03-05 21:55:15 +000093 defaults: ["libprocessgroup_build_flags_cc"],
Jiyong Parke3d371e2020-04-08 22:37:42 +090094 apex_available: [
95 "//apex_available:platform",
96 "//apex_available:anyapex",
97 ],
Jooyung Han4f55f3e2020-04-16 18:48:33 +090098 min_sdk_version: "29",
Steven Moreland419ce362017-04-19 14:12:52 -070099}
Bart Van Assche59af6802022-01-24 21:08:57 +0000100
101cc_test {
102 name: "task_profiles_test",
103 host_supported: true,
T.J. Mercierf8901762024-03-05 21:55:15 +0000104 defaults: ["libprocessgroup_build_flags_cc"],
Bart Van Assche59af6802022-01-24 21:08:57 +0000105 srcs: [
106 "task_profiles_test.cpp",
107 ],
108 header_libs: [
109 "libcutils_headers",
110 "libprocessgroup_headers",
111 ],
112 shared_libs: [
113 "libbase",
114 "libcgrouprc",
115 "libprocessgroup",
116 ],
117 static_libs: [
118 "libgmock",
T.J. Merciera09ee8e2024-10-08 23:41:27 +0000119 "libprocessgroup_util",
Bart Van Assche59af6802022-01-24 21:08:57 +0000120 ],
121}