diff --git a/cc/sanitize.go b/cc/sanitize.go index ea6a33e2f..53de14bd3 100644 --- a/cc/sanitize.go +++ b/cc/sanitize.go @@ -574,22 +574,22 @@ func sanitizerMutator(t sanitizerType) func(android.BottomUpMutatorContext) { modules[1].(*Module).sanitize.Properties.InSanitizerDir = true modules[1].(*Module).sanitize.SetSanitizer(cfi, false) } - } - if mctx.AConfig().EmbeddedInMake() && !mctx.Device() { - if isSanitizerEnabled { - modules[0].(*Module).Properties.HideFromMake = true - } else { - modules[1].(*Module).Properties.HideFromMake = true - } - } - if !mctx.AConfig().EmbeddedInMake() || !mctx.Device() { + } else { if isSanitizerEnabled { modules[0].(*Module).Properties.PreventInstall = true } else { modules[1].(*Module).Properties.PreventInstall = true } } - + if mctx.AConfig().EmbeddedInMake() { + if !mctx.Device() { + if isSanitizerEnabled { + modules[0].(*Module).Properties.HideFromMake = true + } else { + modules[1].(*Module).Properties.HideFromMake = true + } + } + } } c.sanitize.Properties.SanitizeDep = false }