diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2018-05-27 07:25:15 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2018-05-27 07:25:15 +0000 |
commit | aa3ed2a3f61c48ac75e5bf5aba02d8c599eb93ef (patch) | |
tree | 1a9f6b5b81aa28009f67b044776c8de2d8bdfbde | |
parent | a1f540b3d15fbac96fdfab18608738e32192c69b (diff) | |
parent | 1c54f66bd56d00592b6ce55826411ae6af9e2697 (diff) | |
download | build_soong-aa3ed2a3f61c48ac75e5bf5aba02d8c599eb93ef.tar.gz build_soong-aa3ed2a3f61c48ac75e5bf5aba02d8c599eb93ef.tar.bz2 build_soong-aa3ed2a3f61c48ac75e5bf5aba02d8c599eb93ef.zip |
Snap for 4807121 from 1c54f66bd56d00592b6ce55826411ae6af9e2697 to pi-release
Change-Id: I115236c6d50a30b3e0d20c8631d7198e9fc999cd
-rw-r--r-- | cc/sanitize.go | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/cc/sanitize.go b/cc/sanitize.go index fc44eaf1..881a5a01 100644 --- a/cc/sanitize.go +++ b/cc/sanitize.go @@ -224,8 +224,8 @@ func (sanitize *sanitize) begin(ctx BaseModuleContext) { } } - // Enable CFI for all components in the include paths - if s.Cfi == nil && ctx.Config().CFIEnabledForPath(ctx.ModuleDir()) { + // 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 { s.Cfi = boolPtr(true) if inList("cfi", ctx.Config().SanitizeDeviceDiag()) { s.Diag.Cfi = boolPtr(true) @@ -256,6 +256,13 @@ func (sanitize *sanitize) begin(ctx BaseModuleContext) { s.Diag.Cfi = nil } + // Also disable CFI for VNDK variants of components in the + // include paths + if ctx.isVndk() && ctx.useVndk() && ctx.Config().CFIEnabledForPath(ctx.ModuleDir()) { + s.Cfi = nil + s.Diag.Cfi = nil + } + if ctx.staticBinary() { s.Address = nil s.Coverage = nil |