diff --git a/cc/sanitize.go b/cc/sanitize.go index c9fcafc97..a1eae4ec4 100644 --- a/cc/sanitize.go +++ b/cc/sanitize.go @@ -226,9 +226,13 @@ func (sanitize *sanitize) begin(ctx BaseModuleContext) { // Enable CFI for all components in the include paths if s.Cfi == nil && ctx.Config().CFIEnabledForPath(ctx.ModuleDir()) { - s.Cfi = boolPtr(true) - if inList("cfi", ctx.Config().SanitizeDeviceDiag()) { - s.Diag.Cfi = boolPtr(true) + // Do not rely on include paths for anything other than ARM64. + // TODO: Relax this constraint for 2019. + if ctx.Arch().ArchType == android.Arm64 { + s.Cfi = boolPtr(true) + if inList("cfi", ctx.Config().SanitizeDeviceDiag()) { + s.Diag.Cfi = boolPtr(true) + } } }