Match src paths with aidl package name

In order for the build system to track updates to the header files
during incremental builds, always specify the src files using the same
path as the package for C++ compilations.

Bug: 112114177
Test: treehugger
Change-Id: I33c684de4c0c52012b496d2f2447eceaba26c191
This commit is contained in:
Dan Willemsen 2018-09-14 21:27:01 -07:00
parent f91264c7d6
commit a5d6522ff0
6 changed files with 178 additions and 163 deletions

View file

@ -172,6 +172,7 @@ filegroup {
srcs: [
"binder/android/os/IInstalld.aidl",
],
path: "binder",
}
//

View file

@ -143,6 +143,7 @@ filegroup {
srcs: [
"aidl/android/content/pm/IPackageManagerNative.aidl",
],
path: "aidl",
}
subdirs = ["tests"]

View file

@ -28,8 +28,7 @@ cc_library_shared {
],
srcs: [
"aidl/android/hardware/ISensorPrivacyListener.aidl",
"aidl/android/hardware/ISensorPrivacyManager.aidl",
":libsensorprivacy_aidl",
"SensorPrivacyManager.cpp",
],
@ -45,3 +44,12 @@ cc_library_shared {
export_shared_lib_headers: ["libbinder"],
}
filegroup {
name: "libsensorprivacy_aidl",
srcs: [
"aidl/android/hardware/ISensorPrivacyListener.aidl",
"aidl/android/hardware/ISensorPrivacyManager.aidl",
],
path: "aidl",
}

View file

@ -1,180 +1,152 @@
cc_library_shared {
name: "libvr_hwc-hal",
name: "libvr_hwc-hal",
srcs: [
"impl/vr_hwc.cpp",
"impl/vr_composer_client.cpp",
],
srcs: [
"impl/vr_hwc.cpp",
"impl/vr_composer_client.cpp",
],
static_libs: [
"libbroadcastring",
"libdisplay",
],
static_libs: [
"libbroadcastring",
"libdisplay",
],
shared_libs: [
"android.frameworks.vr.composer@1.0",
"android.hardware.graphics.composer@2.1",
"android.hardware.graphics.mapper@2.0",
"android.hardware.graphics.mapper@3.0",
"libbase",
"libbufferhubqueue",
"libbinder",
"libcutils",
"libfmq",
"libhardware",
"libhidlbase",
"libhidltransport",
"liblog",
"libsync",
"libui",
"libutils",
"libpdx_default_transport",
],
shared_libs: [
"android.frameworks.vr.composer@1.0",
"android.hardware.graphics.composer@2.1",
"android.hardware.graphics.mapper@2.0",
"android.hardware.graphics.mapper@3.0",
"libbase",
"libbufferhubqueue",
"libbinder",
"libcutils",
"libfmq",
"libhardware",
"libhidlbase",
"libhidltransport",
"liblog",
"libsync",
"libui",
"libutils",
"libpdx_default_transport",
],
header_libs: [
"android.hardware.graphics.composer@2.1-command-buffer",
"android.hardware.graphics.composer@2.1-hal",
],
header_libs: [
"android.hardware.graphics.composer@2.1-command-buffer",
"android.hardware.graphics.composer@2.1-hal",
],
export_header_lib_headers: [
"android.hardware.graphics.composer@2.1-hal",
],
export_header_lib_headers: [
"android.hardware.graphics.composer@2.1-hal",
],
export_static_lib_headers: [
"libdisplay",
],
export_static_lib_headers: [
"libdisplay",
],
export_shared_lib_headers: [
"android.frameworks.vr.composer@1.0",
"android.hardware.graphics.composer@2.1",
],
export_shared_lib_headers: [
"android.frameworks.vr.composer@1.0",
"android.hardware.graphics.composer@2.1",
],
export_include_dirs: ["."],
export_include_dirs: ["."],
cflags: [
"-DLOG_TAG=\"vr_hwc\"",
"-DATRACE_TAG=ATRACE_TAG_GRAPHICS",
"-Wall",
"-Werror",
"-Wno-error=unused-private-field",
// Warnings in vr_hwc.cpp to be fixed after sync of goog/master.
"-Wno-sign-compare",
"-Wno-unused-parameter",
],
cflags: [
"-DLOG_TAG=\"vr_hwc\"",
"-DATRACE_TAG=ATRACE_TAG_GRAPHICS",
"-Wall",
"-Werror",
"-Wno-error=unused-private-field",
// Warnings in vr_hwc.cpp to be fixed after sync of goog/master.
"-Wno-sign-compare",
"-Wno-unused-parameter",
],
}
cc_library_static {
name: "libvr_hwc-binder",
srcs: [
"aidl/android/dvr/IVrComposer.aidl",
"aidl/android/dvr/IVrComposerCallback.aidl",
"aidl/android/dvr/parcelable_composer_frame.cpp",
"aidl/android/dvr/parcelable_composer_layer.cpp",
"aidl/android/dvr/parcelable_unique_fd.cpp",
],
aidl: {
include_dirs: ["frameworks/native/services/vr/hardware_composer/aidl"],
export_aidl_headers: true,
},
export_include_dirs: ["aidl"],
cflags: [
"-Wall",
"-Werror",
],
shared_libs: [
"libbinder",
"libui",
"libutils",
"libvr_hwc-hal",
],
}
cc_library_static {
name: "libvr_hwc-impl",
srcs: [
"vr_composer.cpp",
],
static_libs: [
"libvr_hwc-binder",
],
shared_libs: [
"libbase",
"libbinder",
"liblog",
"libui",
"libutils",
"libvr_hwc-hal",
],
export_shared_lib_headers: [
"libvr_hwc-hal",
],
cflags: [
"-DLOG_TAG=\"vr_hwc\"",
"-Wall",
"-Werror",
],
name: "libvr_hwc-impl",
srcs: [
"vr_composer.cpp",
],
static_libs: [
"libvr_hwc-binder",
],
shared_libs: [
"libbase",
"libbinder",
"liblog",
"libui",
"libutils",
"libvr_hwc-hal",
],
export_shared_lib_headers: [
"libvr_hwc-hal",
],
cflags: [
"-DLOG_TAG=\"vr_hwc\"",
"-Wall",
"-Werror",
],
}
cc_binary {
name: "vr_hwc",
vintf_fragments: ["manifest_vr_hwc.xml"],
srcs: [
"vr_hardware_composer_service.cpp"
],
static_libs: [
"libvr_hwc-impl",
// NOTE: This needs to be included after the *-impl lib otherwise the
// symbols in the *-binder library get optimized out.
"libvr_hwc-binder",
],
shared_libs: [
"android.frameworks.vr.composer@1.0",
"android.hardware.graphics.composer@2.1",
"libbase",
"libbinder",
"liblog",
"libhardware",
"libhwbinder",
"libui",
"libutils",
"libvr_hwc-hal",
],
cflags: [
"-DLOG_TAG=\"vr_hwc\"",
"-Wall",
"-Werror",
],
init_rc: [
"vr_hwc.rc",
],
name: "vr_hwc",
vintf_fragments: ["manifest_vr_hwc.xml"],
srcs: [
"vr_hardware_composer_service.cpp",
],
static_libs: [
"libvr_hwc-impl",
// NOTE: This needs to be included after the *-impl lib otherwise the
// symbols in the *-binder library get optimized out.
"libvr_hwc-binder",
],
shared_libs: [
"android.frameworks.vr.composer@1.0",
"android.hardware.graphics.composer@2.1",
"libbase",
"libbinder",
"liblog",
"libhardware",
"libhwbinder",
"libui",
"libutils",
"libvr_hwc-hal",
],
cflags: [
"-DLOG_TAG=\"vr_hwc\"",
"-Wall",
"-Werror",
],
init_rc: [
"vr_hwc.rc",
],
}
cc_test {
name: "vr_hwc_test",
gtest: true,
srcs: ["tests/vr_composer_test.cpp"],
static_libs: [
"libgtest",
"libvr_hwc-impl",
// NOTE: This needs to be included after the *-impl lib otherwise the
// symbols in the *-binder library get optimized out.
"libvr_hwc-binder",
],
cflags: [
"-Wall",
"-Werror",
// warnings in vr_composer_test.cpp to be fixed after merge of goog/master
"-Wno-sign-compare",
"-Wno-unused-parameter",
],
shared_libs: [
"libbase",
"libbinder",
"liblog",
"libui",
"libutils",
],
name: "vr_hwc_test",
gtest: true,
srcs: ["tests/vr_composer_test.cpp"],
static_libs: [
"libgtest",
"libvr_hwc-impl",
// NOTE: This needs to be included after the *-impl lib otherwise the
// symbols in the *-binder library get optimized out.
"libvr_hwc-binder",
],
cflags: [
"-Wall",
"-Werror",
// warnings in vr_composer_test.cpp to be fixed after merge of goog/master
"-Wno-sign-compare",
"-Wno-unused-parameter",
],
shared_libs: [
"libbase",
"libbinder",
"liblog",
"libui",
"libutils",
],
}

View file

@ -0,0 +1,27 @@
cc_library_static {
name: "libvr_hwc-binder",
srcs: [
"android/dvr/IVrComposer.aidl",
"android/dvr/IVrComposerCallback.aidl",
"android/dvr/parcelable_composer_frame.cpp",
"android/dvr/parcelable_composer_layer.cpp",
"android/dvr/parcelable_unique_fd.cpp",
],
aidl: {
local_include_dirs: ["."],
export_aidl_headers: true,
},
export_include_dirs: ["."],
cflags: [
"-Wall",
"-Werror",
],
shared_libs: [
"libbinder",
"libui",
"libutils",
"libvr_hwc-hal",
],
}

View file

@ -62,7 +62,7 @@ cc_test {
service_src = [
"main.cpp",
"VirtualTouchpadService.cpp",
"aidl/android/dvr/IVirtualTouchpadService.aidl",
":virtualtouchpad_aidl",
]
service_static_libs = [
@ -99,7 +99,7 @@ cc_binary {
client_src = [
"VirtualTouchpadClient.cpp",
"DvrVirtualTouchpadClient.cpp",
"aidl/android/dvr/IVirtualTouchpadService.aidl",
":virtualtouchpad_aidl",
]
client_shared_libs = [
@ -122,3 +122,9 @@ cc_library {
name: "libvirtualtouchpadclient",
export_include_dirs: ["include"],
}
filegroup {
name: "virtualtouchpad_aidl",
srcs: ["aidl/android/dvr/IVirtualTouchpadService.aidl"],
path: "aidl",
}