Create sysprop_library soong module
A newly introduced sysprop_library soong module will generate a
java_sdk_library and a cc_library from .sysprop description files.
Both Java modules and C++ modules can link against sysprop_library
module, thus giving consistency for using generated sysprop API.
As Java controls accessibility of Internal / System properties with
@hide and @SystemApi, 2 different header files will be created. And
build system will selectively expose depending on the property owner
and the place where the client libraries go into.
Bug: 80125326
Bug: 122170616
Test: 1) Create sysprop_library module.
Test: 2) Create empty txt files under prebuilts/sdk.
Test: 3) Create api directory, make update-api, and see changes.
Test: 4) Try to link against sysprop_library with various clients.
Test: 5) Soc_specific, Device_specific, Product_specific, recovery flags
work as intended.
Change-Id: I78dc5780ccfbb4b69e5c61dec26b94e92d43c333
diff --git a/Android.bp b/Android.bp
index 92a6e9d..b407314 100644
--- a/Android.bp
+++ b/Android.bp
@@ -148,6 +148,7 @@
"cc/sabi.go",
"cc/stl.go",
"cc/strip.go",
+ "cc/sysprop.go",
"cc/tidy.go",
"cc/util.go",
"cc/vndk.go",
@@ -178,6 +179,8 @@
"cc/genrule.go",
"cc/vendor_public_library.go",
+
+ "cc/testing.go",
],
testSrcs: [
"cc/cc_test.go",
@@ -378,6 +381,25 @@
pluginFor: ["soong_build"],
}
+bootstrap_go_package {
+ name: "soong-sysprop",
+ pkgPath: "android/soong/sysprop",
+ deps: [
+ "blueprint",
+ "soong",
+ "soong-android",
+ "soong-cc",
+ "soong-java",
+ ],
+ srcs: [
+ "sysprop/sysprop_library.go",
+ ],
+ testSrcs: [
+ "sysprop/sysprop_test.go",
+ ],
+ pluginFor: ["soong_build"],
+}
+
//
// Defaults to enable various configurations of host bionic
//