summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jay Patel <pateljay@google.com> 2021-08-18 15:18:41 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2021-08-18 15:18:41 +0000
commiteaf5e1b3ec38ddd87d247dd8fff58910017b0a64 (patch)
tree011bb18935e3d36bcb8488650ceeaa7871fa8d39
parent3931b8c70d1f77462be44e1d052984850150618e (diff)
parent9c993544650a3b60e3d4f819aa800f2737a36db2 (diff)
Merge "Allow PRODUCT_CFI_INCLUDE_PATHS to work with blueprints also"
-rw-r--r--cc/library.go2
-rw-r--r--cc/sanitize.go4
2 files changed, 3 insertions, 3 deletions
diff --git a/cc/library.go b/cc/library.go
index b2360e9da..84cd0d7e8 100644
--- a/cc/library.go
+++ b/cc/library.go
@@ -1754,7 +1754,7 @@ func (library *libraryDecorator) install(ctx ModuleContext, file android.Path) {
mayUseCoreVariant = false
}
- if ctx.Config().CFIEnabledForPath(ctx.ModuleDir()) && ctx.Arch().ArchType == android.Arm64 {
+ if ctx.Config().CFIEnabledForPath(ctx.ModuleDir()) {
mayUseCoreVariant = false
}
diff --git a/cc/sanitize.go b/cc/sanitize.go
index b24439437..dd15ae13d 100644
--- a/cc/sanitize.go
+++ b/cc/sanitize.go
@@ -437,8 +437,8 @@ func (sanitize *sanitize) begin(ctx BaseModuleContext) {
}
}
- // Enable CFI for all components in the include paths (for Aarch64 only)
- if s.Cfi == nil && ctx.Config().CFIEnabledForPath(ctx.ModuleDir()) && ctx.Arch().ArchType == android.Arm64 {
+ // Enable CFI for non-host components in the include paths
+ if s.Cfi == nil && ctx.Config().CFIEnabledForPath(ctx.ModuleDir()) && !ctx.Host() {
s.Cfi = proptools.BoolPtr(true)
if inList("cfi", ctx.Config().SanitizeDeviceDiag()) {
s.Diag.Cfi = proptools.BoolPtr(true)