From 59a7ae9bdf4e794417ddc72dce2451ddca469ff9 Mon Sep 17 00:00:00 2001 From: Ivan Lozano Date: Thu, 31 Jan 2019 10:09:13 -0800 Subject: [PATCH] XOM dependency check skipping static binaries. The execute-only memory dependency check is skipped for static binaries. Make sure we check dependencies in this case. Bug: 123603191 Test: readelf on static binary with xom-incompatible dependencies Change-Id: I7ddd3058811cdf4e9cf862163e1bf5add4981b32 --- cc/xom.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cc/xom.go b/cc/xom.go index 182069fbe..9337990f8 100644 --- a/cc/xom.go +++ b/cc/xom.go @@ -50,7 +50,7 @@ func (xom *xom) flags(ctx ModuleContext, flags Flags) Flags { // If any static dependencies have XOM disabled, we should disable XOM in this module, // the assumption being if it's been explicitly disabled then there's probably incompatible // code in the library which may get pulled in. - if !ctx.static() && !disableXom { + if !disableXom { ctx.VisitDirectDeps(func(m android.Module) { cc, ok := m.(*Module) if !ok || cc.xom == nil || !cc.static() {