Disable global coverage when a module disables asan.

am: 774cb81796

Change-Id: I98d21cf78da95815d74f43dde669410b199bde44
This commit is contained in:
Evgenii Stepanov
2017-01-24 20:58: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 {
s.Address = boolPtr(true)
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 {