aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2017-04-11 03:24:59 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2017-04-11 03:25:00 +0000
commit12b3117e2bd881e4f5996f6ef8016454174d325e (patch)
tree8bc634c227d22ef9f0cd10715e4d0707f49afd34
parent0417699bbbd4151711e09925f3c72cbf3b8e81a5 (diff)
parent538b454c3df9b95a5db8e8b4d11838a40339f4f9 (diff)
downloadbuild_soong-12b3117e2bd881e4f5996f6ef8016454174d325e.tar.gz
build_soong-12b3117e2bd881e4f5996f6ef8016454174d325e.tar.bz2
build_soong-12b3117e2bd881e4f5996f6ef8016454174d325e.zip
Merge "Implement vendor as a synonym of proprietary" into oc-dev
-rw-r--r--android/androidmk.go3
-rw-r--r--android/module.go13
-rw-r--r--android/paths.go2
-rw-r--r--androidmk/cmd/androidmk/android.go4
-rw-r--r--cc/cc.go2
5 files changed, 16 insertions, 8 deletions
diff --git a/android/androidmk.go b/android/androidmk.go
index d55cdca3..1268c97b 100644
--- a/android/androidmk.go
+++ b/android/androidmk.go
@@ -232,6 +232,9 @@ func translateAndroidMkModule(ctx blueprint.SingletonContext, w io.Writer, mod b
if amod.commonProperties.Proprietary {
fmt.Fprintln(w, "LOCAL_PROPRIETARY_MODULE := true")
}
+ if amod.commonProperties.Vendor {
+ fmt.Fprintln(w, "LOCAL_VENDOR_MODULE := true")
+ }
if amod.commonProperties.Owner != "" {
fmt.Fprintln(w, "LOCAL_MODULE_OWNER :=", amod.commonProperties.Owner)
}
diff --git a/android/module.go b/android/module.go
index 4fba1cf7..f8585e4e 100644
--- a/android/module.go
+++ b/android/module.go
@@ -59,7 +59,7 @@ type androidBaseContext interface {
Darwin() bool
Debug() bool
PrimaryArch() bool
- Proprietary() bool
+ Vendor() bool
AConfig() Config
DeviceConfig() DeviceConfig
}
@@ -142,6 +142,9 @@ type commonProperties struct {
// vendor who owns this module
Owner string
+ // whether this module is device specific and should be installed into /vendor
+ Vendor bool
+
// *.logtags files, to combine together in order to generate the /system/etc/event-log-tags
// file
Logtags []string
@@ -461,7 +464,7 @@ func (a *ModuleBase) androidBaseContextFactory(ctx blueprint.BaseModuleContext)
return androidBaseContextImpl{
target: a.commonProperties.CompileTarget,
targetPrimary: a.commonProperties.CompilePrimary,
- proprietary: a.commonProperties.Proprietary,
+ vendor: a.commonProperties.Proprietary || a.commonProperties.Vendor,
config: ctx.Config().(Config),
}
}
@@ -498,7 +501,7 @@ type androidBaseContextImpl struct {
target Target
targetPrimary bool
debug bool
- proprietary bool
+ vendor bool
config Config
}
@@ -627,8 +630,8 @@ func (a *androidBaseContextImpl) DeviceConfig() DeviceConfig {
return DeviceConfig{a.config.deviceConfig}
}
-func (a *androidBaseContextImpl) Proprietary() bool {
- return a.proprietary
+func (a *androidBaseContextImpl) Vendor() bool {
+ return a.vendor
}
func (a *androidModuleContext) InstallInData() bool {
diff --git a/android/paths.go b/android/paths.go
index fe639e62..969c7537 100644
--- a/android/paths.go
+++ b/android/paths.go
@@ -649,7 +649,7 @@ func PathForModuleInstall(ctx ModuleContext, paths ...string) OutputPath {
var outPaths []string
if ctx.Device() {
partition := "system"
- if ctx.Proprietary() {
+ if ctx.Vendor() {
partition = ctx.DeviceConfig().VendorPath()
}
diff --git a/androidmk/cmd/androidmk/android.go b/androidmk/cmd/androidmk/android.go
index 33e7eb39..bd9d8ee0 100644
--- a/androidmk/cmd/androidmk/android.go
+++ b/androidmk/cmd/androidmk/android.go
@@ -69,12 +69,12 @@ func init() {
"LOCAL_PACKAGE_NAME": "name",
"LOCAL_MODULE_RELATIVE_PATH": "relative_install_path",
"LOCAL_PROTOC_OPTIMIZE_TYPE": "proto.type",
- "LOCAL_HEADER_LIBRARIES": "header_libs",
"LOCAL_MODULE_OWNER": "owner",
})
addStandardProperties(bpparser.ListType,
map[string]string{
"LOCAL_SRC_FILES_EXCLUDE": "exclude_srcs",
+ "LOCAL_HEADER_LIBRARIES": "header_libs",
"LOCAL_SHARED_LIBRARIES": "shared_libs",
"LOCAL_STATIC_LIBRARIES": "static_libs",
"LOCAL_WHOLE_STATIC_LIBRARIES": "whole_static_libs",
@@ -90,6 +90,7 @@ func init() {
"LOCAL_YACCFLAGS": "yaccflags",
"LOCAL_SANITIZE_RECOVER": "sanitize.recover",
"LOCAL_LOGTAGS_FILES": "logtags",
+ "LOCAL_EXPORT_HEADER_LIBRARY_HEADERS": "export_header_lib_headers",
"LOCAL_EXPORT_SHARED_LIBRARY_HEADERS": "export_shared_lib_headers",
"LOCAL_EXPORT_STATIC_LIBRARY_HEADERS": "export_static_lib_headers",
"LOCAL_INIT_RC": "init_rc",
@@ -121,6 +122,7 @@ func init() {
"LOCAL_PACK_MODULE_RELOCATIONS": "pack_relocations",
"LOCAL_TIDY": "tidy",
"LOCAL_PROPRIETARY_MODULE": "proprietary",
+ "LOCAL_VENDOR_MODULE": "vendor",
"LOCAL_EXPORT_PACKAGE_RESOURCES": "export_package_resources",
})
diff --git a/cc/cc.go b/cc/cc.go
index 3ed1d7e1..8ef606f6 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -389,7 +389,7 @@ func (ctx *moduleContextImpl) sdkVersion() string {
}
func (ctx *moduleContextImpl) vndk() bool {
- return ctx.ctx.Os() == android.Android && ctx.ctx.Proprietary() && ctx.ctx.DeviceConfig().CompileVndk()
+ return ctx.ctx.Os() == android.Android && ctx.ctx.Vendor() && ctx.ctx.DeviceConfig().CompileVndk()
}
func (ctx *moduleContextImpl) selectedStl() string {