summaryrefslogtreecommitdiff
path: root/rust/project_json.go
diff options
context:
space:
mode:
authorJaewoong Jung <jungjw@google.com>2020-10-09 17:25:15 -0700
committerJaewoong Jung <jungjw@google.com>2020-10-12 14:15:19 +0000
commit642916f20aa4a37cad49d9f2cc2a66831b09772a (patch)
tree43c98dd1387262ca8b65cc074a48c0b942e59ae0 /rust/project_json.go
parent3c72ce8696d83466d7ef815a5cdd18df4fd1a59a (diff)
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
Diffstat (limited to 'rust/project_json.go')
-rw-r--r--rust/project_json.go2
1 files changed, 1 insertions, 1 deletions
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
}
}