adb54f81bf
In order to register native services init needs ability to communicate with lmkd. Make liblmkd_utils library available in recovery mode so that init can link to it and add a data socket in lmkd to support additional connection from init. Ensure SOCK_CLOEXEC type for lmkd socket to prevent init children from inheriting it. Bug: 129011369 Test: boot and verify native service registration Change-Id: Iaa4f59282fb10f838f6811571e97d55754b1bd41 Signed-off-by: Suren Baghdasaryan <surenb@google.com>
61 lines
1.1 KiB
Text
61 lines
1.1 KiB
Text
cc_defaults {
|
|
name: "stats_defaults",
|
|
|
|
product_variables: {
|
|
use_lmkd_stats_log: {
|
|
cflags: [
|
|
"-DLMKD_LOG_STATS"
|
|
],
|
|
},
|
|
},
|
|
}
|
|
|
|
cc_binary {
|
|
name: "lmkd",
|
|
|
|
srcs: ["lmkd.c"],
|
|
shared_libs: [
|
|
"libcutils",
|
|
"liblog",
|
|
"libprocessgroup",
|
|
"libpsi",
|
|
],
|
|
static_libs: [
|
|
"libstatslogc",
|
|
"libstatssocket",
|
|
],
|
|
local_include_dirs: ["include"],
|
|
cflags: ["-Werror", "-DLMKD_TRACE_KILLS"],
|
|
init_rc: ["lmkd.rc"],
|
|
defaults: ["stats_defaults"],
|
|
logtags: ["event.logtags"],
|
|
}
|
|
|
|
cc_library_static {
|
|
name: "libstatslogc",
|
|
srcs: ["statslog.c"],
|
|
cflags: [
|
|
"-Wall",
|
|
"-Werror",
|
|
],
|
|
defaults: ["stats_defaults"],
|
|
shared_libs: [
|
|
"liblog",
|
|
],
|
|
static_libs: ["libstatssocket",],
|
|
}
|
|
|
|
cc_library_static {
|
|
name: "liblmkd_utils",
|
|
srcs: ["liblmkd_utils.c"],
|
|
recovery_available: true,
|
|
shared_libs: [
|
|
"libcutils",
|
|
],
|
|
export_include_dirs: ["include"],
|
|
cppflags: [
|
|
"-g",
|
|
"-Wall",
|
|
"-Werror",
|
|
]
|
|
}
|