From ec2858799bbe0d99a763302de9791b2242378e79 Mon Sep 17 00:00:00 2001 From: Zhijun He Date: Sat, 24 Apr 2021 10:47:08 -0700 Subject: [PATCH] Soong: check if lndk is needed for apex build This is to fix the unnecessary dependencies inclusion when building apex modules. Test: Build Bug: 186306595 Change-Id: I1f3bbdb0a1f97a8338b45ca29c92acf9b20eadd3 --- cc/cc.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cc/cc.go b/cc/cc.go index c5552d6e6..a0ad0d688 100644 --- a/cc/cc.go +++ b/cc/cc.go @@ -3230,6 +3230,9 @@ func (c *Module) DepIsInSameApex(ctx android.BaseModuleContext, dep android.Modu return false } } + if cc.IsLlndk() { + return false + } if isLibDepTag && c.static() && libDepTag.shared() { // shared_lib dependency from a static lib is considered as crossing // the APEX boundary because the dependency doesn't actually is