• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1package {
2    default_applicable_licenses: ["Android-Apache-2.0"],
3}
4
5soong_config_module_type {
6    name: "libprocessgroup_flag_aware_cc_defaults",
7    module_type: "cc_defaults",
8    config_namespace: "ANDROID",
9    bool_variables: [
10        "cgroup_v2_sys_app_isolation",
11    ],
12    properties: [
13        "cflags",
14    ],
15}
16
17libprocessgroup_flag_aware_cc_defaults {
18    name: "libprocessgroup_build_flags_cc",
19    cpp_std: "gnu++23",
20    soong_config_variables: {
21        cgroup_v2_sys_app_isolation: {
22            cflags: [
23                "-DCGROUP_V2_SYS_APP_ISOLATION=true",
24            ],
25        },
26    },
27}
28
29cc_library_headers {
30    name: "libprocessgroup_headers",
31    vendor_available: true,
32    product_available: true,
33    ramdisk_available: true,
34    vendor_ramdisk_available: true,
35    recovery_available: true,
36    host_supported: true,
37    native_bridge_supported: true,
38    export_include_dirs: ["include"],
39    target: {
40        linux_bionic: {
41            enabled: true,
42        },
43        windows: {
44            enabled: true,
45        },
46    },
47    apex_available: [
48        "//apex_available:platform",
49        "//apex_available:anyapex",
50    ],
51    min_sdk_version: "29",
52}
53
54cc_library {
55    srcs: [
56        "cgroup_map.cpp",
57        "processgroup.cpp",
58        "sched_policy.cpp",
59        "task_profiles.cpp",
60    ],
61    name: "libprocessgroup",
62    host_supported: true,
63    native_bridge_supported: true,
64    ramdisk_available: true,
65    vendor_ramdisk_available: true,
66    recovery_available: true,
67    vendor_available: true,
68    product_available: true,
69    double_loadable: true,
70    shared_libs: [
71        "libbase",
72    ],
73    static_libs: [
74        "libjsoncpp",
75        "libprocessgroup_util",
76    ],
77    // for cutils/android_filesystem_config.h
78    header_libs: [
79        "libcutils_headers",
80        "libprocessgroup_headers",
81    ],
82    export_include_dirs: ["include"],
83    export_header_lib_headers: [
84        "libprocessgroup_headers",
85    ],
86    defaults: ["libprocessgroup_build_flags_cc"],
87    apex_available: [
88        "//apex_available:platform",
89        "//apex_available:anyapex",
90    ],
91    min_sdk_version: "29",
92}
93
94cc_test {
95    name: "task_profiles_test",
96    host_supported: true,
97    defaults: ["libprocessgroup_build_flags_cc"],
98    srcs: [
99        "task_profiles_test.cpp",
100    ],
101    header_libs: [
102        "libcutils_headers",
103        "libprocessgroup_headers",
104    ],
105    shared_libs: [
106        "libbase",
107        "libprocessgroup",
108    ],
109    static_libs: [
110        "libgmock",
111        "libprocessgroup_util",
112    ],
113}
114