From 642916f20aa4a37cad49d9f2cc2a66831b09772a Mon Sep 17 00:00:00 2001 From: Jaewoong Jung Date: Fri, 9 Oct 2020 17:25:15 -0700 Subject: Add config.AndroidFirstDeviceTarget. Targets[Android][0] is not always the first, preferred target. Add a new field to config to provide the correct target and begin to use it. Test: m nothing Test: build/soong/scripts/build-ndk-prebuilts.sh Fixes: 156980228 Change-Id: Ib56f52424ebf47f3eee6ac62b9fd9eca2919d63a --- rust/project_json.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rust/project_json.go') diff --git a/rust/project_json.go b/rust/project_json.go index 8d161b2d7..569740831 100644 --- a/rust/project_json.go +++ b/rust/project_json.go @@ -93,7 +93,7 @@ func librarySource(ctx android.SingletonContext, rModule *Module, rustLib *libra return "", false } default: - if rModule.Target().String() != ctx.Config().Targets[android.Android][0].String() { + if rModule.Target().String() != ctx.Config().AndroidFirstDeviceTarget.String() { return "", false } } -- cgit v1.2.3-59-g8ed1b