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
This commit is contained in:
Inseob Kim 2020-05-04 19:28:25 +09:00
parent b39e15d3f3
commit 69cf09e1fd
1 changed files with 6 additions and 4 deletions

View File

@ -494,11 +494,13 @@ func syspropLibraryHook(ctx android.LoadHookContext, m *syspropLibrary) {
}) })
} }
syspropLibrariesLock.Lock() if m.ExportedToMake() {
defer syspropLibrariesLock.Unlock() syspropLibrariesLock.Lock()
defer syspropLibrariesLock.Unlock()
libraries := syspropLibraries(ctx.Config()) libraries := syspropLibraries(ctx.Config())
*libraries = append(*libraries, ctx.ModuleName()) *libraries = append(*libraries, "//"+ctx.ModuleDir()+":"+ctx.ModuleName())
}
} }
func syspropDepsMutator(ctx android.BottomUpMutatorContext) { func syspropDepsMutator(ctx android.BottomUpMutatorContext) {