From 42d48b7b8b94e301d703656db0b25bc5ee7eb3bc Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Wed, 29 Aug 2018 14:10:52 -0700 Subject: 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 --- java/system_modules.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'java/system_modules.go') 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 { -- cgit v1.2.3