platform_hardware_libhardware/Android.bp
Jooyung Han ef6e982e10 Use libapexsupport only for apex variants
Bug: 312510312
Test: m libhardware libhardware.vendor libhardware.vendor.com.google.cf.ir
  # check DTNEEDED
  # only apex variant should have libapexsupport
Change-Id: I3161b54aeb9dd6c5780041769fa149302c621279
2023-11-28 22:37:39 +09:00

136 lines
4 KiB
Text

// Copyright 2006 The Android Open Source Project
package {
default_applicable_licenses: ["hardware_libhardware_license"],
}
// Added automatically by a large-scale-change that took the approach of
// 'apply every license found to every target'. While this makes sure we respect
// every license restriction, it may not be entirely correct.
//
// e.g. GPL in an MIT project might only apply to the contrib/ directory.
//
// Please consider splitting the single license below into multiple licenses,
// taking care not to lose any license_kind information, and overriding the
// default license using the 'licenses: [...]' property on targets as needed.
//
// For unused files, consider creating a 'fileGroup' with "//visibility:private"
// to attach the license to, and including a comment whether the files may be
// used in the current project.
// See: http://go/android-license-faq
license {
name: "hardware_libhardware_license",
visibility: [":__subpackages__"],
license_kinds: [
"SPDX-license-identifier-Apache-2.0",
"SPDX-license-identifier-BSD",
],
license_text: [
"NOTICE",
],
}
cc_library_headers {
name: "libhardware_headers",
header_libs: [
"libaudio_system_headers",
"libsystem_headers",
"libcutils_headers",
],
export_header_lib_headers: [
"libaudio_system_headers",
"libsystem_headers",
"libcutils_headers",
],
recovery_available: true,
vendor_available: true,
// TODO(b/153609531): remove when no longer needed.
native_bridge_supported: true,
// There are three include directories currently:
// - include: this directory is the original location of libhardware headers. It is globally
// available (even if you do not depend on libhardware). Many locations also use
// LOCAL_C_INCLUDES or include_dirs to access these from a global namespace. These processes
// should replace this dependency with a direct dependency on libhardware(_headers)?.
// - include_all: this directory is for system and vendor include files. Gradually, the number of
// files here should be reduced to 0 by moving them to vendor as old code is phased out.
// - include_vendor: this directory is the current designated resting place for these headers.
// They are kept around to try to help insure existing codebases can function.
export_include_dirs: ["include_all"],
target: {
recovery: {
exclude_header_libs: [
"libaudio_system_headers",
],
},
windows: {
enabled: true,
},
vendor: {
override_export_include_dirs: [
"include_all",
"include_vendor",
],
},
},
apex_available: [
"//apex_available:platform",
"com.android.btservices",
"com.android.media",
"com.android.media.swcodec",
],
min_sdk_version: "29",
host_supported: true,
}
cc_library_shared {
name: "libhardware",
srcs: ["hardware.c"],
shared_libs: [
"libapexsupport",
"libcutils",
"liblog",
"libvndksupport",
],
cflags: [
"-DQEMU_HARDWARE",
"-Wall",
"-Werror",
],
header_libs: ["libhardware_headers"],
export_header_lib_headers: ["libhardware_headers"],
host_supported: true,
recovery_available: true,
vendor_available: true,
vndk: {
enabled: true,
support_system_process: true,
},
target: {
host: {
exclude_shared_libs: [
"libapexsupport",
"libvndksupport",
],
},
recovery: {
exclude_shared_libs: [
"libapexsupport",
"libvndksupport",
],
},
non_apex: {
exclude_shared_libs: [
"libapexsupport",
],
},
},
min_sdk_version: "29",
}