aboutsummaryrefslogtreecommitdiffstats
path: root/android
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@google.com>2016-12-05 17:16:02 -0800
committerDan Willemsen <dwillemsen@google.com>2016-12-05 17:21:13 -0800
commit4353bc4422c13a5737112a3f2e0dfc84fbdac38f (patch)
treedbcec2f705ddcd7be5888138afe2aed9b028d868 /android
parent7ed1ae3fa4dd23c9c66f729172830ab5224e2dd1 (diff)
downloadbuild_soong-4353bc4422c13a5737112a3f2e0dfc84fbdac38f.tar.gz
build_soong-4353bc4422c13a5737112a3f2e0dfc84fbdac38f.tar.bz2
build_soong-4353bc4422c13a5737112a3f2e0dfc84fbdac38f.zip
Support system/vendor for devices without a vendor partition
Test: lunch aosp_arm-eng; m -j vulkan.default Change-Id: I91eabf98f53c455ec4ade95215f11a6f89631747
Diffstat (limited to 'android')
-rw-r--r--android/config.go7
-rw-r--r--android/paths.go2
-rw-r--r--android/variable.go2
3 files changed, 10 insertions, 1 deletions
diff --git a/android/config.go b/android/config.go
index 4a59bade..8f531ccd 100644
--- a/android/config.go
+++ b/android/config.go
@@ -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 ""
diff --git a/android/paths.go b/android/paths.go
index 1a6125a3..e76e1fe6 100644
--- a/android/paths.go
+++ b/android/paths.go
@@ -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"
diff --git a/android/variable.go b/android/variable.go
index 3436a75e..1ee6c9bb 100644
--- a/android/variable.go
+++ b/android/variable.go
@@ -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"`