blob: 694d7458e8d2799bcfdc6e2047c24abed892841f [file]
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"],
}
aconfig_declarations {
name: "installd_flags",
package: "android.installd.flags",
container: "system",
srcs: [
"installd_flags.aconfig",
],
}
cc_aconfig_library {
name: "installd_flags_c_lib",
aconfig_declarations: "installd_flags",
}
cc_defaults {
name: "installd_defaults",
cflags: [
"-Wall",
"-Werror",
"-Wextra",
"-Wunreachable-code",
"-Wunreachable-code-break",
"-Wunreachable-code-return",
],
srcs: [
"CacheItem.cpp",
"CacheTracker.cpp",
"CrateManager.cpp",
"InstalldNativeService.cpp",
"QuotaUtils.cpp",
"SysTrace.cpp",
"dexopt.cpp",
"execv_helper.cpp",
"globals.cpp",
"restorable_file.cpp",
"run_dex2oat.cpp",
"unique_file.cpp",
"utils.cpp",
"utils_default.cpp",
":installd_aidl",
],
shared_libs: [
"libbase",
"libbinder",
"libcrypto",
"libcutils",
"liblog",
"liblogwrap",
"libprocessgroup",
"libselinux",
"libutils",
"libziparchive",
"server_configurable_flags",
],
static_libs: [
"installd_flags_c_lib",
"libasync_safe",
"libext2_uuid",
],
export_shared_lib_headers: [
"libbinder",
],
product_variables: {
arc: {
exclude_srcs: [
"QuotaUtils.cpp",
],
static_libs: [
"libarcdiskquota",
"arc_services_aidl",
],
cflags: [
"-DUSE_ARC",
],
},
},
tidy: true,
tidy_checks: [
"-*",
"clang-analyzer-security*",
"cert-*",
"-cert-err58-cpp",
],
tidy_checks_as_errors: [
"clang-analyzer-security*",
"cert-*",
],
}
//
// Static library used in testing and executable
//
cc_library_static {
name: "libinstalld",
defaults: ["installd_defaults"],
export_include_dirs: ["."],
aidl: {
export_aidl_headers: true,
},
product_variables: {
arc: {
exclude_srcs: [
"QuotaUtils.cpp",
],
static_libs: [
"libarcdiskquota",
"arc_services_aidl",
],
cflags: [
"-DUSE_ARC",
],
},
},
}
cc_library_headers {
name: "libinstalld_headers",
export_include_dirs: ["."],
}
//
// Unit tests
//
cc_test_host {
name: "run_dex2oat_test",
test_suites: ["general-tests"],
srcs: [
"run_dex2oat_test.cpp",
"run_dex2oat.cpp",
"unique_file.cpp",
"execv_helper.cpp",
],
cflags: [
"-Wall",
"-Werror",
],
shared_libs: [
"libbase",
"server_configurable_flags",
],
test_config: "run_dex2oat_test.xml",
}
//
// Executable
//
cc_binary {
name: "installd",
defaults: ["installd_defaults"],
srcs: ["installd.cpp"],
static_libs: ["libdiskusage"],
init_rc: ["installd.rc"],
product_variables: {
arc: {
exclude_srcs: [
"QuotaUtils.cpp",
],
static_libs: [
"libarcdiskquota",
"arc_services_aidl",
],
cflags: [
"-DUSE_ARC",
],
},
},
// Needs to be wherever installd is as it's execed by
// installd.
required: ["migrate_legacy_obb_data"],
}
filegroup {
name: "installd_aidl",
srcs: [
"binder/**/*.aidl",
],
path: "binder",
}
// OTA postinstall script
sh_binary {
name: "otapreopt_script",
src: "otapreopt_script.sh",
}
// Script to migrate legacy obb data.
sh_binary {
name: "migrate_legacy_obb_data",
src: "migrate_legacy_obb_data.sh",
}