Build native coverage variant of APEXes when needed

When the native coverage is enabled, APEXes (and files there) are built
for native coverage as well.

Bug: 138952487
Test: make -j NATIVE_COVERAGE=true COVERAGE_PATHS='*' com.android.resolv
find out -name "*.gcno" | grep DnsResolver shows files

Test: libnetd_resolv.zip is found under
$(TARGET_OUT)/apex/com.android.resolv/lib directory

Change-Id: I97bcee9bf8ffc0dc71453abbdb613ed56ea2cdb4
This commit is contained in:
Jiyong Park
2019-08-09 14:44:36 +09:00
parent 02ed5df4ac
commit ee9a98d88e
6 changed files with 62 additions and 2 deletions

View File

@@ -425,6 +425,10 @@ func (binary *binaryDecorator) nativeCoverage() bool {
return true
}
func (binary *binaryDecorator) coverageOutputFilePath() android.OptionalPath {
return binary.coverageOutputFile
}
// /system/bin/linker -> /apex/com.android.runtime/bin/linker
func (binary *binaryDecorator) installSymlinkToRuntimeApex(ctx ModuleContext, file android.Path) {
dir := binary.baseInstaller.installDir(ctx)