aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2018-05-07 15:28:05 -0700
committerandroid-build-team Robot <android-build-team-robot@google.com>2018-05-11 17:13:59 +0000
commit127eb1800c5883d7ee5e56b079a7feca641ed9f6 (patch)
treef2cad8c27fd155461f919ab659162b0896204603
parent358647b5ec1114ac16ac76b7c533245ded00d433 (diff)
downloadbuild_soong-127eb1800c5883d7ee5e56b079a7feca641ed9f6.tar.gz
build_soong-127eb1800c5883d7ee5e56b079a7feca641ed9f6.tar.bz2
build_soong-127eb1800c5883d7ee5e56b079a7feca641ed9f6.zip
Don't install modules in unexported namespaces
Make builds handle modules with duplicate names in different namespaces by passing a list of exported namespaces to Soong. Soong-only builds can try to install both modules, leading to a duplicate rule error. Re-use the same list of exported namespaces in Soong, which will be empty in all existing Soong-only builds. This will effectively only install modules in the root namespace in Soong-only builds. Test: m checkbuild Bug: 79369665 Change-Id: Ie80d4b77e1dce165a33579fcf58b571989794b35 (cherry picked from commit 3607f21303837dcc5ec1da66fa1bc8ffc680de61)
-rw-r--r--android/module.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/android/module.go b/android/module.go
index 1e544700..3276ab36 100644
--- a/android/module.go
+++ b/android/module.go
@@ -995,6 +995,13 @@ func (a *androidModuleContext) skipInstall(fullInstallPath OutputPath) bool {
return true
}
+ // We'll need a solution for choosing which of modules with the same name in different
+ // namespaces to install. For now, reuse the list of namespaces exported to Make as the
+ // list of namespaces to install in a Soong-only build.
+ if !a.module.base().commonProperties.NamespaceExportedToMake {
+ return true
+ }
+
if a.Device() {
if a.Config().SkipDeviceInstall() {
return true