Merge "Add cc_defaults wrapper for android.hardware.graphics.allocator ndk package."

This commit is contained in:
Treehugger Robot 2022-10-21 20:13:17 +00:00 committed by Gerrit Code Review
commit a92da63775
13 changed files with 107 additions and 27 deletions

59
graphics/Android.bp Normal file
View file

@ -0,0 +1,59 @@
// Copyright (C) 2022 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package {
default_applicable_licenses: ["hardware_interfaces_license"],
}
cc_defaults {
name: "android.hardware.graphics.allocator-ndk_static",
static_libs: [
"android.hardware.graphics.allocator-V1-ndk",
],
}
cc_defaults {
name: "android.hardware.graphics.allocator-ndk_shared",
shared_libs: [
"android.hardware.graphics.allocator-V1-ndk",
],
}
cc_defaults {
name: "android.hardware.graphics.common-ndk_static",
static_libs: [
"android.hardware.graphics.common-V3-ndk",
],
}
cc_defaults {
name: "android.hardware.graphics.common-ndk_shared",
shared_libs: [
"android.hardware.graphics.common-V3-ndk",
],
}
cc_defaults {
name: "android.hardware.graphics.composer3-ndk_static",
static_libs: [
"android.hardware.graphics.composer3-V1-ndk",
],
}
cc_defaults {
name: "android.hardware.graphics.composer3-ndk_shared",
shared_libs: [
"android.hardware.graphics.composer3-V1-ndk",
],
}

View file

@ -27,6 +27,7 @@ cc_test {
name: "VtsHalGraphicsAllocatorAidl_TargetTest",
defaults: [
"VtsHalTargetTestDefaults",
"android.hardware.graphics.allocator-ndk_shared",
"use_libaidlvintf_gtest_helper_static",
"hwui_defaults",
],
@ -35,8 +36,6 @@ cc_test {
],
shared_libs: [
"android.hardware.graphics.allocator-V1-ndk",
"android.hardware.graphics.common-V3-ndk",
"android.hardware.graphics.mapper@4.0",
"libEGL",
"libGLESv2",

View file

@ -25,14 +25,16 @@ package {
cc_library_static {
name: "android.hardware.graphics.composer@2.1-vts",
defaults: ["hidl_defaults"],
defaults: [
"android.hardware.graphics.allocator-ndk_static",
"hidl_defaults",
],
srcs: [
"ComposerVts.cpp",
"GraphicsComposerCallback.cpp",
"TestCommandReader.cpp",
],
static_libs: [
"android.hardware.graphics.allocator-V1-ndk",
"android.hardware.graphics.composer@2.1",
"android.hardware.graphics.mapper@2.0-vts",
"android.hardware.graphics.mapper@3.0-vts",
@ -40,7 +42,6 @@ cc_library_static {
"libgtest",
],
export_static_lib_headers: [
"android.hardware.graphics.allocator-V1-ndk",
"android.hardware.graphics.composer@2.1",
"android.hardware.graphics.mapper@2.0-vts",
"android.hardware.graphics.mapper@3.0-vts",

View file

@ -25,7 +25,10 @@ package {
cc_test {
name: "VtsHalGraphicsComposerV2_1TargetTest",
defaults: ["VtsHalTargetTestDefaults"],
defaults: [
"VtsHalTargetTestDefaults",
"android.hardware.graphics.allocator-ndk_static",
],
tidy_timeout_srcs: ["VtsHalGraphicsComposerV2_1TargetTest.cpp"],
srcs: ["VtsHalGraphicsComposerV2_1TargetTest.cpp"],
@ -42,7 +45,6 @@ cc_test {
"android.hardware.graphics.mapper@4.0",
],
static_libs: [
"android.hardware.graphics.allocator-V1-ndk",
"android.hardware.graphics.allocator@2.0",
"android.hardware.graphics.allocator@3.0",
"android.hardware.graphics.allocator@4.0",

View file

@ -25,7 +25,11 @@ package {
cc_library_static {
name: "android.hardware.graphics.composer@2.2-vts",
defaults: ["hidl_defaults"],
defaults: [
"android.hardware.graphics.allocator-ndk_static",
"android.hardware.graphics.composer3-ndk_static",
"hidl_defaults",
],
srcs: [
"ComposerVts.cpp",
"ReadbackVts.cpp",
@ -35,7 +39,6 @@ cc_library_static {
"libui",
],
static_libs: [
"android.hardware.graphics.allocator-V1-ndk",
"android.hardware.graphics.composer@2.1-vts",
"android.hardware.graphics.composer@2.2",
"android.hardware.graphics.composer3-V1-ndk",
@ -53,7 +56,6 @@ cc_library_static {
"android.hardware.graphics.mapper@4.0-vts",
],
export_static_lib_headers: [
"android.hardware.graphics.allocator-V1-ndk",
"android.hardware.graphics.composer@2.1-vts",
"android.hardware.graphics.composer@2.2",
"android.hardware.graphics.mapper@2.1-vts",

View file

@ -27,6 +27,8 @@ cc_test {
name: "VtsHalGraphicsComposerV2_2TargetTest",
defaults: [
"VtsHalTargetTestDefaults",
"android.hardware.graphics.allocator-ndk_static",
"android.hardware.graphics.composer3-ndk_static",
// Needed for librenderengine
"skia_deps",
],
@ -59,7 +61,6 @@ cc_test {
"android.hardware.graphics.mapper@4.0",
],
static_libs: [
"android.hardware.graphics.allocator-V1-ndk",
"android.hardware.graphics.allocator@2.0",
"android.hardware.graphics.allocator@3.0",
"android.hardware.graphics.allocator@4.0",

View file

@ -25,7 +25,10 @@ package {
cc_library_static {
name: "android.hardware.graphics.composer@2.3-vts",
defaults: ["hidl_defaults"],
defaults: [
"android.hardware.graphics.allocator-ndk_static",
"hidl_defaults",
],
srcs: [
"ComposerVts.cpp",
],

View file

@ -25,7 +25,10 @@ package {
cc_test {
name: "VtsHalGraphicsComposerV2_3TargetTest",
defaults: ["VtsHalTargetTestDefaults"],
defaults: [
"VtsHalTargetTestDefaults",
"android.hardware.graphics.allocator-ndk_static",
],
tidy_timeout_srcs: ["VtsHalGraphicsComposerV2_3TargetTest.cpp"],
srcs: ["VtsHalGraphicsComposerV2_3TargetTest.cpp"],
@ -43,7 +46,6 @@ cc_test {
"android.hardware.graphics.mapper@4.0",
],
static_libs: [
"android.hardware.graphics.allocator-V1-ndk",
"android.hardware.graphics.allocator@2.0",
"android.hardware.graphics.allocator@3.0",
"android.hardware.graphics.allocator@4.0",

View file

@ -25,14 +25,16 @@ package {
cc_library_static {
name: "android.hardware.graphics.composer@2.4-vts",
defaults: ["hidl_defaults"],
defaults: [
"android.hardware.graphics.allocator-ndk_static",
"hidl_defaults",
],
srcs: [
"ComposerVts.cpp",
"GraphicsComposerCallback.cpp",
"TestCommandReader.cpp",
],
static_libs: [
"android.hardware.graphics.allocator-V1-ndk",
"android.hardware.graphics.composer@2.1",
"android.hardware.graphics.composer@2.2",
"android.hardware.graphics.composer@2.3-vts",

View file

@ -25,7 +25,10 @@ package {
cc_test {
name: "VtsHalGraphicsComposerV2_4TargetTest",
defaults: ["VtsHalTargetTestDefaults"],
defaults: [
"VtsHalTargetTestDefaults",
"android.hardware.graphics.allocator-ndk_static",
],
tidy_timeout_srcs: ["VtsHalGraphicsComposerV2_4TargetTest.cpp"],
srcs: ["VtsHalGraphicsComposerV2_4TargetTest.cpp"],
@ -42,7 +45,6 @@ cc_test {
"android.hardware.graphics.mapper@4.0",
],
static_libs: [
"android.hardware.graphics.allocator-V1-ndk",
"android.hardware.graphics.allocator@2.0",
"android.hardware.graphics.allocator@3.0",
"android.hardware.graphics.allocator@4.0",

View file

@ -25,14 +25,17 @@ package {
cc_library_static {
name: "android.hardware.graphics.mapper@4.0-vts",
defaults: ["VtsHalTargetTestDefaults"],
defaults: [
"VtsHalTargetTestDefaults",
"android.hardware.graphics.allocator-ndk_static",
"android.hardware.graphics.common-ndk_static",
],
srcs: ["MapperVts.cpp"],
cflags: [
"-O0",
"-g",
],
static_libs: [
"android.hardware.graphics.allocator-V1-ndk",
"android.hardware.graphics.allocator@4.0",
"android.hardware.graphics.common-V3-ndk",
"android.hardware.graphics.mapper@4.0",
@ -44,7 +47,6 @@ cc_library_static {
"libvndksupport",
],
export_static_lib_headers: [
"android.hardware.graphics.allocator-V1-ndk",
"android.hardware.graphics.allocator@4.0",
"android.hardware.graphics.common-V3-ndk",
"android.hardware.graphics.mapper@4.0",

View file

@ -27,6 +27,8 @@ cc_test {
name: "VtsHalGraphicsMapperV4_0TargetTest",
defaults: [
"VtsHalTargetTestDefaults",
"android.hardware.graphics.allocator-ndk_shared",
"android.hardware.graphics.common-ndk_static",
"use_libaidlvintf_gtest_helper_static",
],
srcs: ["VtsHalGraphicsMapperV4_0TargetTest.cpp"],
@ -38,7 +40,6 @@ cc_test {
"libsync",
],
shared_libs: [
"android.hardware.graphics.allocator-V1-ndk",
"android.hardware.graphics.allocator@4.0",
"android.hardware.graphics.common@1.0",
"android.hardware.graphics.common@1.1",

View file

@ -27,9 +27,11 @@ package {
// dependencies
cc_defaults {
name: "VtsHalSensorsDefaults",
defaults: [
"android.hardware.graphics.allocator-ndk_shared",
"android.hardware.graphics.common-ndk_shared",
],
shared_libs: [
"android.hardware.graphics.allocator-V1-ndk",
"android.hardware.graphics.common-V3-ndk",
"libbinder_ndk",
"libutils",
"libvndksupport",
@ -42,7 +44,11 @@ cc_defaults {
cc_library_static {
name: "VtsHalSensorsTargetTestUtils",
defaults: ["VtsHalTargetTestDefaults"],
defaults: [
"VtsHalTargetTestDefaults",
"android.hardware.graphics.allocator-ndk_shared",
"android.hardware.graphics.common-ndk_shared",
],
cflags: ["-DLOG_TAG=\"sensors_hidl_hal_test\""],
srcs: [
"GrallocWrapper.cpp",
@ -55,8 +61,6 @@ cc_library_static {
],
// Targets that depend on us need to also include these
shared_libs: [
"android.hardware.graphics.allocator-V1-ndk",
"android.hardware.graphics.common-V3-ndk",
"libbinder_ndk",
"libutils",
"libvndksupport",