From 155d17c1da6da9cde02cd2850b4a85aba322684c Mon Sep 17 00:00:00 2001 From: Dan Willemsen Date: Wed, 6 Feb 2019 18:30:02 -0800 Subject: [PATCH] Return early after NDK->non-NDK library link error Otherwise the code after this assumes that the "to" library is an NDK library and panics when it isn't. Bug: 124019854 Test: trigger error, no longer see panic Change-Id: I88d10e8d882285e24b4f42d0cf85c2d658348617 --- cc/cc.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cc/cc.go b/cc/cc.go index 02f36d5b2..c09a2f3a9 100644 --- a/cc/cc.go +++ b/cc/cc.go @@ -1378,6 +1378,7 @@ func checkLinkType(ctx android.ModuleContext, from *Module, to *Module, tag depe // NDK code linking to platform code is never okay. ctx.ModuleErrorf("depends on non-NDK-built library %q", ctx.OtherModuleName(to)) + return } // At this point we know we have two NDK libraries, but we need to