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
diff --git a/sysprop/sysprop_library.go b/sysprop/sysprop_library.go
index 0932873..9f27647 100644
--- a/sysprop/sysprop_library.go
+++ b/sysprop/sysprop_library.go
@@ -494,11 +494,13 @@
 		})
 	}
 
-	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) {