blob: 3897197bd552f1a97d45fb5712885ce40009fcad [file] [log] [blame]
package {
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "frameworks_native_license"
// to get the below license kinds:
// SPDX-license-identifier-Apache-2.0
default_applicable_licenses: ["frameworks_native_license"],
}
cc_defaults {
name: "servicemanager_defaults",
cflags: [
"-Wall",
"-Wextra",
"-Werror",
"-DANDROID_UTILS_REF_BASE_DISABLE_IMPLICIT_CONSTRUCTION",
],
srcs: [
"Access.cpp",
"ServiceManager.cpp",
],
shared_libs: [
"libbase",
"libvintf",
"libcutils",
"liblog",
"libutils",
"libselinux",
],
target: {
android: {
shared_libs: [
"libbinder",
"libutils",
],
},
host: {
static_libs: [
"libbinder",
"libutils",
],
},
darwin: {
enabled: false,
},
vendor: {
exclude_shared_libs: ["libvintf"],
},
},
}
cc_binary {
name: "servicemanager",
defaults: ["servicemanager_defaults"],
init_rc: ["servicemanager.rc"],
srcs: ["main.cpp"],
bootstrap: true,
}
cc_binary {
name: "servicemanager.recovery",
stem: "servicemanager",
recovery: true,
defaults: ["servicemanager_defaults"],
init_rc: ["servicemanager.recovery.rc"],
srcs: ["main.cpp"],
}
cc_binary {
name: "vndservicemanager",
defaults: ["servicemanager_defaults"],
init_rc: ["vndservicemanager.rc"],
vendor: true,
cflags: [
"-DVENDORSERVICEMANAGER=1",
],
required: [
"vndservice",
],
srcs: ["main.cpp"],
}
cc_test {
name: "servicemanager_test",
host_supported: true,
test_suites: ["device-tests"],
defaults: ["servicemanager_defaults"],
srcs: [
"test_sm.cpp",
],
static_libs: ["libgmock"],
}
cc_test_host {
name: "servicemanager_unittest",
test_suites: ["general-tests"],
defaults: ["servicemanager_defaults"],
srcs: [
"ServiceManagerUnittest.cpp",
],
static_libs: ["libgmock"],
}
cc_fuzz {
name: "servicemanager_fuzzer",
defaults: [
"servicemanager_defaults",
"service_fuzzer_defaults",
],
host_supported: true,
srcs: ["ServiceManagerFuzzer.cpp"],
fuzz_config: {
libfuzzer_options: [
"max_len=50000",
],
cc: [
"smoreland@google.com",
"waghpawan@google.com",
],
},
}