Fix sanitize host builds
Host builds don't have a separate place to install asan modules, so only create a single variant for them. Change-Id: I81f7090debd7935db778f8600d8cbc86dd53b1cb
This commit is contained in:
parent
bc6fb16b26
commit
b36ab1a1a0
|
@ -331,10 +331,15 @@ func sanitizerMutator(t sanitizerType) func(android.BottomUpMutatorContext) {
|
|||
if d, ok := c.linker.(baseLinkerInterface); ok && d.isDependencyRoot() && c.sanitize.Sanitizer(t) {
|
||||
modules := mctx.CreateVariations(t.String())
|
||||
modules[0].(*Module).sanitize.SetSanitizer(t, true)
|
||||
if mctx.AConfig().EmbeddedInMake() {
|
||||
if mctx.AConfig().EmbeddedInMake() && !c.Host() {
|
||||
modules[0].(*Module).sanitize.Properties.InData = true
|
||||
}
|
||||
} else if c.sanitize.Properties.SanitizeDep {
|
||||
if c.Host() {
|
||||
modules := mctx.CreateVariations(t.String())
|
||||
modules[0].(*Module).sanitize.SetSanitizer(t, true)
|
||||
modules[0].(*Module).sanitize.Properties.SanitizeDep = false
|
||||
} else {
|
||||
modules := mctx.CreateVariations("", t.String())
|
||||
modules[0].(*Module).sanitize.SetSanitizer(t, false)
|
||||
modules[1].(*Module).sanitize.SetSanitizer(t, true)
|
||||
|
@ -345,6 +350,7 @@ func sanitizerMutator(t sanitizerType) func(android.BottomUpMutatorContext) {
|
|||
modules[0].(*Module).Properties.HideFromMake = true
|
||||
}
|
||||
}
|
||||
}
|
||||
c.sanitize.Properties.SanitizeDep = false
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue