apex: install hwasan lib if depended on libc
There're two ways to enable hwasan: - global setting: TARGET_SANITIZE=hwaddress - individual setting: sanitize: { hwaddress: true } This change covers both cases by looking up if com.android.runtime is hwaddress santized or not. Bug: 156678661 Test: m (soong test added) Change-Id: I67c382c3e76a06f4b27f221eebd153c698647227
This commit is contained in:
@@ -989,6 +989,7 @@ type Sanitizeable interface {
|
||||
android.Module
|
||||
IsSanitizerEnabled(ctx android.BaseModuleContext, sanitizerName string) bool
|
||||
EnableSanitizer(sanitizerName string)
|
||||
AddSanitizerDependencies(ctx android.BottomUpMutatorContext, sanitizerName string)
|
||||
}
|
||||
|
||||
// Create sanitized variants for modules that need them
|
||||
@@ -1075,6 +1076,7 @@ func sanitizerMutator(t sanitizerType) func(android.BottomUpMutatorContext) {
|
||||
c.sanitize.Properties.SanitizeDep = false
|
||||
} else if sanitizeable, ok := mctx.Module().(Sanitizeable); ok && sanitizeable.IsSanitizerEnabled(mctx, t.name()) {
|
||||
// APEX modules fall here
|
||||
sanitizeable.AddSanitizerDependencies(mctx, t.name())
|
||||
mctx.CreateVariations(t.variationName())
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user