a0cd8f9acb
This adds gcov coverage support for Rust device library and binary modules (including test modules). Support is provided to pass Rust static library gcno files to CC modules and visa versa. Additional changes: * Begin mutator added for Rust modules. * SuffixInList added to android package. * CoverageEnabled added to Coverage interface. * CoverageFiles added to LinkableLibrary interface. * Fix in coverage mutator for non-CC modules which marked the wrong variant as the coverage variant. * Added coverage libraries to the cc.GatherRequiredDepsForTest. Bug: 146448203 Test: NATIVE_COVERAGE=true COVERAGE_PATHS='*' m -j <rust_module> Change-Id: If20728bdde42a1dd544a35a40f0d981b80a5835f
88 lines
1.7 KiB
Go
88 lines
1.7 KiB
Go
package cc
|
|
|
|
import (
|
|
"github.com/google/blueprint"
|
|
|
|
"android/soong/android"
|
|
)
|
|
|
|
type LinkableInterface interface {
|
|
Module() android.Module
|
|
CcLibrary() bool
|
|
CcLibraryInterface() bool
|
|
|
|
OutputFile() android.OptionalPath
|
|
CoverageFiles() android.Paths
|
|
|
|
IncludeDirs() android.Paths
|
|
SetDepsInLinkOrder([]android.Path)
|
|
GetDepsInLinkOrder() []android.Path
|
|
|
|
HasStaticVariant() bool
|
|
GetStaticVariant() LinkableInterface
|
|
|
|
NonCcVariants() bool
|
|
|
|
StubsVersions() []string
|
|
BuildStubs() bool
|
|
SetBuildStubs()
|
|
SetStubsVersions(string)
|
|
StubsVersion() string
|
|
HasStubsVariants() bool
|
|
SelectedStl() string
|
|
ApiLevel() string
|
|
|
|
BuildStaticVariant() bool
|
|
BuildSharedVariant() bool
|
|
SetStatic()
|
|
SetShared()
|
|
Static() bool
|
|
Shared() bool
|
|
Toc() android.OptionalPath
|
|
|
|
Host() bool
|
|
|
|
InRamdisk() bool
|
|
OnlyInRamdisk() bool
|
|
|
|
InRecovery() bool
|
|
OnlyInRecovery() bool
|
|
|
|
UseSdk() bool
|
|
UseVndk() bool
|
|
MustUseVendorVariant() bool
|
|
IsVndk() bool
|
|
HasVendorVariant() bool
|
|
|
|
SdkVersion() string
|
|
AlwaysSdk() bool
|
|
|
|
ToolchainLibrary() bool
|
|
NdkPrebuiltStl() bool
|
|
StubDecorator() bool
|
|
}
|
|
|
|
type DependencyTag struct {
|
|
blueprint.BaseDependencyTag
|
|
Name string
|
|
Library bool
|
|
Shared bool
|
|
|
|
ReexportFlags bool
|
|
|
|
ExplicitlyVersioned bool
|
|
|
|
FromStatic bool
|
|
}
|
|
|
|
var (
|
|
SharedDepTag = DependencyTag{Name: "shared", Library: true, Shared: true}
|
|
StaticDepTag = DependencyTag{Name: "static", Library: true}
|
|
|
|
// Same as SharedDepTag, but from a static lib
|
|
SharedFromStaticDepTag = DependencyTag{Name: "shared from static", Library: true, Shared: true, FromStatic: true}
|
|
|
|
CrtBeginDepTag = DependencyTag{Name: "crtbegin"}
|
|
CrtEndDepTag = DependencyTag{Name: "crtend"}
|
|
CoverageDepTag = DependencyTag{Name: "coverage"}
|
|
)
|