Disable CFI for vendor variants of VNDK libraries

Enabling CFI changes the VNDK ABI from the frozen snapshot, so the
only solution for now is to temporarily disable CFI on all vendor
variants for the sake of compatibility.

Bug: 66301104
Test: ABI is consistent.
Change-Id: Ie7dca41e0f647808b08adede09a30f3c746e6bda
This commit is contained in:
Vishwath Mohan
2018-05-23 19:29:55 -07:00
parent 165e01b744
commit 7589c82eec

View File

@@ -256,6 +256,13 @@ func (sanitize *sanitize) begin(ctx BaseModuleContext) {
s.Diag.Cfi = nil 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() { if ctx.staticBinary() {
s.Address = nil s.Address = nil
s.Coverage = nil s.Coverage = nil