Disable CFI for ASAN targets. (Soong)

This CL disables CFI if both CFI and ASAN flags are enabled. This
allows ASAN to take precedence where needed, preventing build errors
that would otherwise arise.

Bug: 30227045
Test: SANITIZE_TARGET="address" m -j40
Change-Id: Id336bf2bf5498d4c3ea6492e36b366c76c06376e
This commit is contained in:
Vishwath Mohan
2017-04-20 07:42:52 -07:00
parent 9ce4529614
commit 8f4fdd8f76

View File

@@ -186,6 +186,12 @@ func (sanitize *sanitize) begin(ctx BaseModuleContext) {
s.Diag.Cfi = nil
}
// Also disable CFI if ASAN is enabled.
if Bool(s.Address) {
s.Cfi = nil
s.Diag.Cfi = nil
}
if ctx.staticBinary() {
s.Address = nil
s.Coverage = nil