Merge "Change PRODUCT_CFI_INCLUDE_PATHS to opt-out (Soong)"
This commit is contained in:
commit
3ab49a2927
1 changed files with 7 additions and 3 deletions
|
@ -226,11 +226,15 @@ func (sanitize *sanitize) begin(ctx BaseModuleContext) {
|
||||||
|
|
||||||
// Enable CFI for all components in the include paths
|
// Enable CFI for all components in the include paths
|
||||||
if s.Cfi == nil && ctx.Config().CFIEnabledForPath(ctx.ModuleDir()) {
|
if s.Cfi == nil && ctx.Config().CFIEnabledForPath(ctx.ModuleDir()) {
|
||||||
|
// 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)
|
s.Cfi = boolPtr(true)
|
||||||
if inList("cfi", ctx.Config().SanitizeDeviceDiag()) {
|
if inList("cfi", ctx.Config().SanitizeDeviceDiag()) {
|
||||||
s.Diag.Cfi = boolPtr(true)
|
s.Diag.Cfi = boolPtr(true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// CFI needs gold linker, and mips toolchain does not have one.
|
// CFI needs gold linker, and mips toolchain does not have one.
|
||||||
if !ctx.Config().EnableCFI() || ctx.Arch().ArchType == android.Mips || ctx.Arch().ArchType == android.Mips64 {
|
if !ctx.Config().EnableCFI() || ctx.Arch().ArchType == android.Mips || ctx.Arch().ArchType == android.Mips64 {
|
||||||
|
|
Loading…
Reference in a new issue