aboutsummaryrefslogtreecommitdiffstats
path: root/cc/binary.go
diff options
context:
space:
mode:
authorPirama Arumuga Nainar <pirama@google.com>2019-03-25 10:21:31 -0700
committerPirama Arumuga Nainar <pirama@google.com>2019-03-29 08:56:42 -0700
commit65c95ff1fb3e50927f49e0e95c1f980af850f034 (patch)
tree24b49a7cd7ce9d9afac4fd12b90fa99e7492c8f8 /cc/binary.go
parentee30d5e13278e434679e946432ce09459a1aa0de (diff)
downloadbuild_soong-65c95ff1fb3e50927f49e0e95c1f980af850f034.tar.gz
build_soong-65c95ff1fb3e50927f49e0e95c1f980af850f034.tar.bz2
build_soong-65c95ff1fb3e50927f49e0e95c1f980af850f034.zip
Include libprofile-extras to all coverage variants
Bug: http://b/128524141 Include libprofile-extras (defined in system/extras/toolchain-extras) to all modules that need a coverage variant. Also add '-uinit_profile_extras' when linking with coverage. This causes the setup code in libprofile-extras to be linked into binaries/libraries with coverage enabled. We add the static library to the non-coverage variants as well but is a no-op for them (since the '-u...' flag is not added for them). Adding this dependency creates several circular dependencies since coverage variants were being created for other module types that never had any compilation or linking done during the build. This change stops creating coverage variants for toolchain_library, cc_prebuilt_library_*, cc_library_headers module types (by adding a function to the linker interface to specify whether native coverage is enabled). Test: m NATIVE_COVERAGE=true COVERAGE_PATHS=* Test: blueline_coverage target in internal branch (using forrest) Change-Id: I5db876eb953639a55ba007248dd24e497f987730
Diffstat (limited to 'cc/binary.go')
-rw-r--r--cc/binary.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/cc/binary.go b/cc/binary.go
index 60ef2ce4..51e68fcd 100644
--- a/cc/binary.go
+++ b/cc/binary.go
@@ -417,6 +417,10 @@ func (binary *binaryDecorator) symlinkList() []string {
return binary.symlinks
}
+func (binary *binaryDecorator) nativeCoverage() bool {
+ return true
+}
+
// /system/bin/linker -> /apex/com.android.runtime/bin/linker
func (binary *binaryDecorator) installSymlinkToRuntimeApex(ctx ModuleContext, file android.Path) {
dir := binary.baseInstaller.installDir(ctx)