blob: a7ba4f5ba51b6245e31d6cdc0895f5b2a247cb87 [file]
package {
default_applicable_licenses: ["Android-Apache-2.0"],
}
cc_defaults {
name: "libprocessgroup_defaults",
cpp_std: "gnu++23",
}
cc_library_headers {
name: "libprocessgroup_headers",
vendor_available: true,
product_available: true,
ramdisk_available: true,
vendor_ramdisk_available: true,
recovery_available: true,
host_supported: true,
native_bridge_supported: true,
export_include_dirs: ["include"],
target: {
linux_bionic: {
enabled: true,
},
windows: {
enabled: true,
},
},
apex_available: [
"//apex_available:platform",
"//apex_available:anyapex",
],
min_sdk_version: "29",
}
cc_library {
name: "libprocessgroup",
srcs: [
"cgroup_map.cpp",
"processgroup.cpp",
"sched_policy.cpp",
"task_profiles.cpp",
],
host_supported: true,
native_bridge_supported: true,
ramdisk_available: true,
vendor_ramdisk_available: true,
recovery_available: true,
vendor_available: true,
product_available: true,
double_loadable: true,
shared_libs: [
"libbase",
],
static_libs: [
"libjsoncpp",
"libprocessgroup_util",
],
// for cutils/android_filesystem_config.h
header_libs: [
"libcutils_headers",
"libprocessgroup_headers",
],
export_include_dirs: ["include"],
export_header_lib_headers: [
"libprocessgroup_headers",
],
defaults: ["libprocessgroup_defaults"],
apex_available: [
"//apex_available:platform",
"//apex_available:anyapex",
],
min_sdk_version: "29",
target: {
android_x86: {
version_script: "libprocessgroup.32bit.map",
},
android_arm: {
version_script: "libprocessgroup.32bit.map",
},
linux_glibc_x86: {
version_script: "libprocessgroup.32bit.map",
},
},
version_script: "libprocessgroup.map",
}
cc_test {
name: "task_profiles_test",
host_supported: true,
defaults: ["libprocessgroup_defaults"],
srcs: [
"task_profiles_test.cpp",
],
header_libs: [
"libcutils_headers",
"libprocessgroup_headers",
],
shared_libs: [
"libbase",
"libprocessgroup",
],
static_libs: [
"libgmock",
"libprocessgroup_util",
],
}
aconfig_declarations {
name: "libprocessgroup_flags",
package: "com.android.core.libprocessgroup.flags",
container: "system",
srcs: ["flags.aconfig"],
}
cc_aconfig_library {
name: "libprocessgroup_flags_c",
aconfig_declarations: "libprocessgroup_flags",
}
// This library does not have a stable ABI or API surface.
//
// It is intended to be used from other components on the system partition, primarily in
// frameworks/base and system/. Do not depend on it from code that can be updated independently
// of the system image, such as any vendor code, mainline modules / updatable apexes.
cc_library {
name: "libprocessgroup_platform",
////////////////////////////////////////////////////////////////////////////////////////////////
// We do not control cgroups on the host! Use a stub guarded by #ifdef __ANDROID__ if your
// module is host_supported and you want to use this library.
host_supported: false,
double_loadable: false,
native_bridge_supported: false,
product_available: false,
ramdisk_available: false,
recovery_available: false,
vendor_available: false,
vendor_ramdisk_available: false,
// Only non-updatable APEXes are permitted here.
// Even for non-updatable APEXes there is a cost, because the file memory for this library is
// duplicated in every APEX that depends on it, since each APEX gets a copy of the .so. These
// should be kept to a minimum (preferably empty!) to avoid wasting memory, and to avoid the
// case where an initially non-updatable APEX is added here, only to become updatable later.
apex_available: [],
////////////////////////////////////////////////////////////////////////////////////////////////
defaults: ["libprocessgroup_defaults"],
export_include_dirs: ["include_platform"],
srcs: [
"processgroup_platform.cpp",
],
shared_libs: [
"libprocessgroup_flags_c",
"libprocessgroup",
],
}