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
diff --git a/cc/xom.go b/cc/xom.go
index 182069f..9337990 100644
--- a/cc/xom.go
+++ b/cc/xom.go
@@ -50,7 +50,7 @@
// 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() {