2021-02-13 10:10:32 +08:00
|
|
|
package {
|
|
|
|
|
default_applicable_licenses: ["Android-Apache-2.0"],
|
|
|
|
|
}
|
|
|
|
|
|
2022-03-29 05:23:15 +08:00
|
|
|
soong_config_module_type {
|
|
|
|
|
name: "lmkd_hooks_cc_defaults",
|
|
|
|
|
module_type: "cc_defaults",
|
|
|
|
|
config_namespace: "lmkd",
|
|
|
|
|
bool_variables: ["use_hooks"],
|
|
|
|
|
properties: [
|
|
|
|
|
"cflags",
|
|
|
|
|
"static_libs",
|
|
|
|
|
],
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
lmkd_hooks_cc_defaults {
|
|
|
|
|
name: "lmkd_hooks_defaults",
|
|
|
|
|
|
|
|
|
|
soong_config_variables: {
|
|
|
|
|
use_hooks: {
|
|
|
|
|
cflags: [
|
2024-03-13 05:18:12 +08:00
|
|
|
"-DLMKD_USE_HOOKS",
|
2022-03-29 05:23:15 +08:00
|
|
|
],
|
|
|
|
|
static_libs: [
|
2024-03-13 05:18:12 +08:00
|
|
|
"liblmkdhooks",
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
},
|
2022-03-29 05:23:15 +08:00
|
|
|
}
|
|
|
|
|
|
2019-09-05 10:12:29 +08:00
|
|
|
cc_defaults {
|
|
|
|
|
name: "stats_defaults",
|
2021-01-20 20:54:03 +08:00
|
|
|
cflags: [
|
2024-03-13 05:18:12 +08:00
|
|
|
"-DLMKD_LOG_STATS",
|
2021-01-20 20:54:03 +08:00
|
|
|
],
|
2019-09-05 10:12:29 +08:00
|
|
|
}
|
|
|
|
|
|
2017-04-28 07:31:05 +08:00
|
|
|
cc_binary {
|
|
|
|
|
name: "lmkd",
|
|
|
|
|
|
2021-06-12 03:12:56 +08:00
|
|
|
srcs: [
|
|
|
|
|
"lmkd.cpp",
|
|
|
|
|
"reaper.cpp",
|
2021-11-17 03:50:29 +08:00
|
|
|
"watchdog.cpp",
|
2021-06-12 03:12:56 +08:00
|
|
|
],
|
2017-04-28 07:31:05 +08:00
|
|
|
shared_libs: [
|
2024-03-13 05:18:12 +08:00
|
|
|
"libbase",
|
2017-04-28 07:31:05 +08:00
|
|
|
"libcutils",
|
2018-03-22 03:24:58 +08:00
|
|
|
"liblog",
|
2024-03-13 05:18:12 +08:00
|
|
|
"libmemevents",
|
2019-01-25 13:32:52 +08:00
|
|
|
"libprocessgroup",
|
2019-01-09 04:54:48 +08:00
|
|
|
"libpsi",
|
2017-04-28 07:31:05 +08:00
|
|
|
],
|
2018-02-01 09:54:56 +08:00
|
|
|
static_libs: [
|
|
|
|
|
"libstatslogc",
|
2020-04-29 06:52:29 +08:00
|
|
|
"liblmkd_utils",
|
2018-02-01 09:54:56 +08:00
|
|
|
],
|
2021-05-28 09:15:44 +08:00
|
|
|
header_libs: [
|
2024-03-13 05:18:12 +08:00
|
|
|
"bpf_headers",
|
2021-05-28 09:15:44 +08:00
|
|
|
],
|
2018-01-25 08:51:41 +08:00
|
|
|
local_include_dirs: ["include"],
|
2020-05-12 07:34:52 +08:00
|
|
|
cflags: [
|
|
|
|
|
"-Wall",
|
|
|
|
|
"-Werror",
|
|
|
|
|
"-Wextra",
|
2024-03-13 05:18:12 +08:00
|
|
|
"-DLMKD_TRACE_KILLS",
|
2020-05-12 07:34:52 +08:00
|
|
|
],
|
2017-04-28 07:31:05 +08:00
|
|
|
init_rc: ["lmkd.rc"],
|
2024-03-13 05:18:12 +08:00
|
|
|
defaults: [
|
|
|
|
|
"stats_defaults",
|
|
|
|
|
"lmkd_hooks_defaults",
|
|
|
|
|
],
|
2018-07-27 07:34:27 +08:00
|
|
|
logtags: ["event.logtags"],
|
2022-01-17 15:35:41 +08:00
|
|
|
afdo: true,
|
2017-04-28 07:31:05 +08:00
|
|
|
}
|
2018-01-25 06:40:36 +08:00
|
|
|
|
2018-02-01 09:54:56 +08:00
|
|
|
cc_library_static {
|
2018-01-25 06:40:36 +08:00
|
|
|
name: "libstatslogc",
|
2019-12-05 04:46:57 +08:00
|
|
|
srcs: ["statslog.cpp"],
|
2021-04-24 08:30:06 +08:00
|
|
|
local_include_dirs: ["include"],
|
2018-01-25 06:40:36 +08:00
|
|
|
cflags: [
|
|
|
|
|
"-Wall",
|
|
|
|
|
"-Werror",
|
2020-05-12 07:34:52 +08:00
|
|
|
"-Wextra",
|
2018-01-25 06:40:36 +08:00
|
|
|
],
|
2019-09-05 10:12:29 +08:00
|
|
|
defaults: ["stats_defaults"],
|
2018-01-25 06:40:36 +08:00
|
|
|
shared_libs: [
|
|
|
|
|
"liblog",
|
2022-02-16 07:39:33 +08:00
|
|
|
"libprocessgroup",
|
2018-01-25 06:40:36 +08:00
|
|
|
],
|
|
|
|
|
}
|
2018-01-25 08:51:41 +08:00
|
|
|
|
|
|
|
|
cc_library_static {
|
|
|
|
|
name: "liblmkd_utils",
|
2019-12-05 04:46:57 +08:00
|
|
|
srcs: ["liblmkd_utils.cpp"],
|
2019-10-22 08:59:22 +08:00
|
|
|
recovery_available: true,
|
2018-01-25 08:51:41 +08:00
|
|
|
shared_libs: [
|
|
|
|
|
"libcutils",
|
2022-03-22 01:47:24 +08:00
|
|
|
"libprocessgroup",
|
2018-01-25 08:51:41 +08:00
|
|
|
],
|
|
|
|
|
export_include_dirs: ["include"],
|
|
|
|
|
cppflags: [
|
|
|
|
|
"-g",
|
|
|
|
|
"-Wall",
|
|
|
|
|
"-Werror",
|
2024-03-13 05:18:12 +08:00
|
|
|
],
|
2018-01-25 08:51:41 +08:00
|
|
|
}
|