From 69cf09e1fd2222b769e1c96515ee2608a7174f8e Mon Sep 17 00:00:00 2001 From: Inseob Kim Date: Mon, 4 May 2020 19:28:25 +0900 Subject: [PATCH] Fix build error of sysprop_library in namespace Dependencies from property_contexts to sysprop_library now uses absolute module path, and modules which are not exported to make are filtered out. Bug: 155148526 Test: add sysprop_library under any soong_namespace Test: check build.ninja and see property_contexts inputs Change-Id: Ib9456e8e5dfca74ce53da3cc947c8e6b1ed9a16b --- sysprop/sysprop_library.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sysprop/sysprop_library.go b/sysprop/sysprop_library.go index 093287312..9f27647a0 100644 --- a/sysprop/sysprop_library.go +++ b/sysprop/sysprop_library.go @@ -494,11 +494,13 @@ func syspropLibraryHook(ctx android.LoadHookContext, m *syspropLibrary) { }) } - syspropLibrariesLock.Lock() - defer syspropLibrariesLock.Unlock() + if m.ExportedToMake() { + syspropLibrariesLock.Lock() + defer syspropLibrariesLock.Unlock() - libraries := syspropLibraries(ctx.Config()) - *libraries = append(*libraries, ctx.ModuleName()) + libraries := syspropLibraries(ctx.Config()) + *libraries = append(*libraries, "//"+ctx.ModuleDir()+":"+ctx.ModuleName()) + } } func syspropDepsMutator(ctx android.BottomUpMutatorContext) {