aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Duffin <paulduffin@google.com>2020-05-04 21:21:12 +0100
committerPaul Duffin <paulduffin@google.com>2020-05-06 08:38:48 +0100
commitfaa21a688ef3124a6851f8c9beb16ecb2ea8b0e4 (patch)
tree1543a86fa0fea59b9c7df12c829134446b0dfaf2
parentdc1bce898e44af125905183c6419a47ad20176b9 (diff)
downloadplatform_system_tools_hidl-faa21a688ef3124a6851f8c9beb16ecb2ea8b0e4.tar.gz
platform_system_tools_hidl-faa21a688ef3124a6851f8c9beb16ecb2ea8b0e4.tar.bz2
platform_system_tools_hidl-faa21a688ef3124a6851f8c9beb16ecb2ea8b0e4.zip
Move call to ExportedToMake() out of LoadHook
A change to run LoadHooks before (rather than after) the module has been registered breaks hidl_interface as its LoadHook calls the ExportedToMake() method which relies on state that is initialized during module registration. This change matches how aidl_interface works. Bug: 155462403 Test: m droid Merged-In: Id55d6fed7ca01e668477457ec124c87a7222268f Change-Id: Id55d6fed7ca01e668477457ec124c87a7222268f (cherry picked from commit 1164ec810cf552ddfb58a385fa7ce8c81fab3b49)
-rw-r--r--build/hidl_interface.go23
1 files changed, 12 insertions, 11 deletions
diff --git a/build/hidl_interface.go b/build/hidl_interface.go
index 71f4a68d0..ebc2dc57f 100644
--- a/build/hidl_interface.go
+++ b/build/hidl_interface.go
@@ -129,6 +129,9 @@ func (m *hidlInterfacesMetadataSingleton) GenerateAndroidBuildActions(ctx androi
var inheritanceHierarchyOutputs android.Paths
ctx.VisitDirectDeps(func(m android.Module) {
+ if !m.ExportedToMake() {
+ return
+ }
if t, ok := m.(*hidlGenRule); ok {
if t.properties.Language == "inheritance-hierarchy" {
inheritanceHierarchyOutputs = append(inheritanceHierarchyOutputs, t.genOutputs.Paths()...)
@@ -893,17 +896,15 @@ This corresponds to the "-r%s:<some path>" option that would be passed into hidl
Inputs: i.properties.Srcs,
})
- if i.ModuleBase.ExportedToMake() {
- mctx.CreateModule(hidlGenFactory, &nameProperties{
- Name: proptools.StringPtr(name.inheritanceHierarchyName()),
- }, &hidlGenProperties{
- Language: "inheritance-hierarchy",
- FqName: name.string(),
- Root: i.properties.Root,
- Interfaces: i.properties.Interfaces,
- Inputs: i.properties.Srcs,
- })
- }
+ mctx.CreateModule(hidlGenFactory, &nameProperties{
+ Name: proptools.StringPtr(name.inheritanceHierarchyName()),
+ }, &hidlGenProperties{
+ Language: "inheritance-hierarchy",
+ FqName: name.string(),
+ Root: i.properties.Root,
+ Interfaces: i.properties.Interfaces,
+ Inputs: i.properties.Srcs,
+ })
}
func (h *hidlInterface) Name() string {