aboutsummaryrefslogtreecommitdiffstats
path: root/java/system_modules.go
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2018-08-29 14:10:52 -0700
committerColin Cross <ccross@android.com>2018-08-30 16:31:02 +0000
commit42d48b7b8b94e301d703656db0b25bc5ee7eb3bc (patch)
tree377b5bdf4556fbb6a04bb436230fe6abcbe64157 /java/system_modules.go
parentb69575b1f697edae9f9b78765d50c8117d21f7d1 (diff)
downloadandroid_build_soong-42d48b7b8b94e301d703656db0b25bc5ee7eb3bc.tar.gz
android_build_soong-42d48b7b8b94e301d703656db0b25bc5ee7eb3bc.tar.bz2
android_build_soong-42d48b7b8b94e301d703656db0b25bc5ee7eb3bc.zip
Enforce dependencies have right architecture
ctx.AddDependency will succeed if the named dependency only has a single variant, even if that variant is the wrong architecture. Use ctx.AddVariationDependency(nil, ...) instead, which requires that all variations of the calling module match the dependency. Bug: 112707915 Test: no change to out/soong/build.ninja Test: using a device dependency in a host java module is an error Change-Id: I70b661a57d4412eb63b8c9841febfb756e9e025d
Diffstat (limited to 'java/system_modules.go')
-rw-r--r--java/system_modules.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/java/system_modules.go b/java/system_modules.go
index d98e0abc..9ee0307c 100644
--- a/java/system_modules.go
+++ b/java/system_modules.go
@@ -123,7 +123,7 @@ func (system *SystemModules) GenerateAndroidBuildActions(ctx android.ModuleConte
}
func (system *SystemModules) DepsMutator(ctx android.BottomUpMutatorContext) {
- ctx.AddDependency(ctx.Module(), libTag, system.properties.Libs...)
+ ctx.AddVariationDependencies(nil, libTag, system.properties.Libs...)
}
func (system *SystemModules) AndroidMk() android.AndroidMkData {