Disable global coverage when a module disables asan. am: 774cb81796

am: d0c027f3ef

Change-Id: I43a0afcbc624e3904698dbb239c829eb828f84fc
This commit is contained in:
Evgenii Stepanov
2017-01-24 21:00:47 +00:00
committed by android-build-merger

View File

@@ -136,8 +136,14 @@ func (sanitize *sanitize) begin(ctx BaseModuleContext) {
s.Undefined = boolPtr(true)
}
if found, globalSanitizers = removeFromList("address", globalSanitizers); found && s.Address == nil {
if found, globalSanitizers = removeFromList("address", globalSanitizers); found {
if s.Address == nil {
s.Address = boolPtr(true)
} else if *s.Address == false {
// Coverage w/o address is an error. If globalSanitizers includes both, and the module
// disables address, then disable coverage as well.
_, globalSanitizers = removeFromList("coverage", globalSanitizers)
}
}
if found, globalSanitizers = removeFromList("thread", globalSanitizers); found && s.Thread == nil {