Merge "Automate NDK API coverage used by Mainline modules build integration" am: e3a2bdf2c8 am: f0fa9dfdd7

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1516605

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic15891d61ac95747f2f2aca0f97cbe302f6e6b70
This commit is contained in:
Sophie Zheng 2020-12-11 22:53:15 +00:00 committed by Automerger Merge Worker
commit 2246c7bbc0
1 changed files with 9 additions and 0 deletions

View File

@ -425,6 +425,15 @@ func (a *apexBundle) androidMkForType() android.AndroidMkData {
for _, dist := range data.Entries.GetDistForGoals(a) {
fmt.Fprintf(w, dist)
}
if a.coverageOutputPath.String() != "" {
goal := "apps_only"
distFile := a.coverageOutputPath.String()
fmt.Fprintf(w, "ifneq (,$(filter $(my_register_name),$(TARGET_BUILD_APPS)))\n"+
" $(call dist-for-goals,%s,%s:ndk_apis_usedby_apex/$(notdir %s))\n"+
"endif",
goal, distFile, distFile)
}
}
}}
}