|
@@ -144,6 +144,9 @@ type syspropLibraryProperties struct {
|
|
|
// list of .sysprop files which defines the properties.
|
|
|
Srcs []string `android:"path"`
|
|
|
|
|
|
+ // If set to true, build a variant of the module for the host. Defaults to false.
|
|
|
+ Host_supported *bool
|
|
|
+
|
|
|
// Whether public stub exists or not.
|
|
|
Public_stub *bool `blueprint:"mutated"`
|
|
|
}
|
|
@@ -306,12 +309,20 @@ type ccLibraryProperties struct {
|
|
|
Sysprop struct {
|
|
|
Platform *bool
|
|
|
}
|
|
|
- Header_libs []string
|
|
|
- Shared_libs []string
|
|
|
+ Target struct {
|
|
|
+ Android struct {
|
|
|
+ Header_libs []string
|
|
|
+ Shared_libs []string
|
|
|
+ }
|
|
|
+ Host struct {
|
|
|
+ Static_libs []string
|
|
|
+ }
|
|
|
+ }
|
|
|
Required []string
|
|
|
Recovery *bool
|
|
|
Recovery_available *bool
|
|
|
Vendor_available *bool
|
|
|
+ Host_supported *bool
|
|
|
}
|
|
|
|
|
|
type javaLibraryProperties struct {
|
|
@@ -394,10 +405,12 @@ func syspropLibraryHook(ctx android.LoadHookContext, m *syspropLibrary) {
|
|
|
ccProps.Device_specific = proptools.BoolPtr(ctx.DeviceSpecific())
|
|
|
ccProps.Product_specific = proptools.BoolPtr(ctx.ProductSpecific())
|
|
|
ccProps.Sysprop.Platform = proptools.BoolPtr(isOwnerPlatform)
|
|
|
- ccProps.Header_libs = []string{"libbase_headers"}
|
|
|
- ccProps.Shared_libs = []string{"liblog"}
|
|
|
+ ccProps.Target.Android.Header_libs = []string{"libbase_headers"}
|
|
|
+ ccProps.Target.Android.Shared_libs = []string{"liblog"}
|
|
|
+ ccProps.Target.Host.Static_libs = []string{"libbase", "liblog"}
|
|
|
ccProps.Recovery_available = m.properties.Recovery_available
|
|
|
ccProps.Vendor_available = m.properties.Vendor_available
|
|
|
+ ccProps.Host_supported = m.properties.Host_supported
|
|
|
ctx.CreateModule(cc.LibraryFactory, &ccProps)
|
|
|
|
|
|
scope := "internal"
|