Merge "Build against cfi supported coverage lib"
This commit is contained in:
commit
0ae13ec307
2 changed files with 12 additions and 0 deletions
10
cc/cc.go
10
cc/cc.go
|
@ -469,6 +469,7 @@ type ModuleContextIntf interface {
|
||||||
nativeCoverage() bool
|
nativeCoverage() bool
|
||||||
directlyInAnyApex() bool
|
directlyInAnyApex() bool
|
||||||
isPreventInstall() bool
|
isPreventInstall() bool
|
||||||
|
isCfiAssemblySupportEnabled() bool
|
||||||
}
|
}
|
||||||
|
|
||||||
type ModuleContext interface {
|
type ModuleContext interface {
|
||||||
|
@ -1244,6 +1245,11 @@ func (c *Module) XrefCcFiles() android.Paths {
|
||||||
return c.kytheFiles
|
return c.kytheFiles
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *Module) isCfiAssemblySupportEnabled() bool {
|
||||||
|
return c.sanitize != nil &&
|
||||||
|
Bool(c.sanitize.Properties.Sanitize.Config.Cfi_assembly_support)
|
||||||
|
}
|
||||||
|
|
||||||
type baseModuleContext struct {
|
type baseModuleContext struct {
|
||||||
android.BaseModuleContext
|
android.BaseModuleContext
|
||||||
moduleContextImpl
|
moduleContextImpl
|
||||||
|
@ -1409,6 +1415,10 @@ func (ctx *moduleContextImpl) isPreventInstall() bool {
|
||||||
return ctx.mod.Properties.PreventInstall
|
return ctx.mod.Properties.PreventInstall
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (ctx *moduleContextImpl) isCfiAssemblySupportEnabled() bool {
|
||||||
|
return ctx.mod.isCfiAssemblySupportEnabled()
|
||||||
|
}
|
||||||
|
|
||||||
func newBaseModule(hod android.HostOrDeviceSupported, multilib android.Multilib) *Module {
|
func newBaseModule(hod android.HostOrDeviceSupported, multilib android.Multilib) *Module {
|
||||||
return &Module{
|
return &Module{
|
||||||
hod: hod,
|
hod: hod,
|
||||||
|
|
|
@ -58,6 +58,8 @@ func getGcovProfileLibraryName(ctx ModuleContextIntf) string {
|
||||||
func getClangProfileLibraryName(ctx ModuleContextIntf) string {
|
func getClangProfileLibraryName(ctx ModuleContextIntf) string {
|
||||||
if ctx.useSdk() {
|
if ctx.useSdk() {
|
||||||
return "libprofile-clang-extras_ndk"
|
return "libprofile-clang-extras_ndk"
|
||||||
|
} else if ctx.isCfiAssemblySupportEnabled() {
|
||||||
|
return "libprofile-clang-extras_cfi_support"
|
||||||
} else {
|
} else {
|
||||||
return "libprofile-clang-extras"
|
return "libprofile-clang-extras"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue