Merge "Revert "Revert "Fix: sanitizerRuntimeMutator is not run for host"""

This commit is contained in:
Treehugger Robot
2019-01-25 04:54:40 +00:00
committed by Gerrit Code Review

View File

@@ -672,10 +672,10 @@ func sanitizerRuntimeDepsMutator(mctx android.TopDownMutatorContext) {
// Add the dependency to the runtime library for each of the sanitizer variants // Add the dependency to the runtime library for each of the sanitizer variants
func sanitizerRuntimeMutator(mctx android.BottomUpMutatorContext) { func sanitizerRuntimeMutator(mctx android.BottomUpMutatorContext) {
if mctx.Os() != android.Android {
return
}
if c, ok := mctx.Module().(*Module); ok && c.sanitize != nil { if c, ok := mctx.Module().(*Module); ok && c.sanitize != nil {
if !c.Enabled() {
return
}
var sanitizers []string var sanitizers []string
var diagSanitizers []string var diagSanitizers []string