Merge \\"Disable asan for static binaries\\" am: 036ce31bfa

am: 2f95978837

Change-Id: I5bfffa4253b3254711759db6a4f00e7206dfba7b
This commit is contained in:
Colin Cross
2016-07-19 00:31:23 +00:00
committed by android-build-merger

View File

@@ -141,9 +141,10 @@ func (sanitize *sanitize) begin(ctx BaseModuleContext) {
ctx.ModuleErrorf("unknown global sanitizer option %s", globalSanitizers[0]) ctx.ModuleErrorf("unknown global sanitizer option %s", globalSanitizers[0])
} }
} }
if Bool(s.All_undefined) || Bool(s.Undefined) || Bool(s.Address) ||
Bool(s.Thread) || Bool(s.Coverage) || Bool(s.Safestack) { if ctx.staticBinary() {
sanitize.Properties.SanitizerEnabled = true s.Address = nil
s.Thread = nil
} }
if Bool(s.All_undefined) { if Bool(s.All_undefined) {
@@ -157,6 +158,11 @@ func (sanitize *sanitize) begin(ctx BaseModuleContext) {
// TODO(ccross): error for compile_multilib = "32"? // TODO(ccross): error for compile_multilib = "32"?
} }
if Bool(s.All_undefined) || Bool(s.Undefined) || Bool(s.Address) ||
Bool(s.Thread) || Bool(s.Coverage) || Bool(s.Safestack) {
sanitize.Properties.SanitizerEnabled = true
}
if Bool(s.Coverage) { if Bool(s.Coverage) {
if !Bool(s.Address) { if !Bool(s.Address) {
ctx.ModuleErrorf(`Use of "coverage" also requires "address"`) ctx.ModuleErrorf(`Use of "coverage" also requires "address"`)