Merge changes from topic 'proprietary-soong'

* changes:
  Support system/vendor for devices without a vendor partition
  Import/Export LOCAL_PROPRIETARY_MODULE
This commit is contained in:
Treehugger Robot 2016-12-06 03:27:00 +00:00 committed by Gerrit Code Review
commit 503f8b0262
5 changed files with 14 additions and 1 deletions

View File

@ -224,6 +224,9 @@ func translateAndroidMkModule(ctx blueprint.SingletonContext, w io.Writer, mod b
if len(amod.commonProperties.Init_rc) > 0 {
fmt.Fprintln(w, "LOCAL_INIT_RC := ", strings.Join(amod.commonProperties.Init_rc, " "))
}
if amod.commonProperties.Proprietary {
fmt.Fprintln(w, "LOCAL_PROPRIETARY_MODULE := true")
}
}
if host {

View File

@ -443,6 +443,13 @@ func (c *deviceConfig) Arches() []Arch {
return arches
}
func (c *deviceConfig) VendorPath() string {
if c.config.ProductVariables.VendorPath != nil {
return *c.config.ProductVariables.VendorPath
}
return "vendor"
}
func (c *deviceConfig) VndkVersion() string {
if c.config.ProductVariables.DeviceVndkVersion == nil {
return ""

View File

@ -631,7 +631,7 @@ func PathForModuleInstall(ctx ModuleContext, paths ...string) OutputPath {
if ctx.Device() {
partition := "system"
if ctx.Proprietary() {
partition = "vendor"
partition = ctx.DeviceConfig().VendorPath()
}
if ctx.InstallInData() {
partition = "data"

View File

@ -113,6 +113,8 @@ type productVariables struct {
UseGoma *bool `json:",omitempty"`
Debuggable *bool `json:",omitempty"`
VendorPath *string `json:",omitempty"`
ClangTidy *bool `json:",omitempty"`
TidyChecks *string `json:",omitempty"`

View File

@ -78,6 +78,7 @@ var standardProperties = map[string]struct {
"LOCAL_PACK_MODULE_RELOCATIONS": {"pack_relocations", bpparser.BoolType},
"LOCAL_TIDY": {"tidy", bpparser.BoolType},
"LOCAL_USE_VNDK": {"use_vndk", bpparser.BoolType},
"LOCAL_PROPRIETARY_MODULE": {"proprietary", bpparser.BoolType},
"LOCAL_EXPORT_PACKAGE_RESOURCES": {"export_package_resources", bpparser.BoolType},
}