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
This commit is contained in:
Dan Willemsen
2019-02-06 18:30:02 -08:00
parent 3a984f55f6
commit 155d17c1da

View File

@@ -1378,6 +1378,7 @@ func checkLinkType(ctx android.ModuleContext, from *Module, to *Module, tag depe
// NDK code linking to platform code is never okay. // NDK code linking to platform code is never okay.
ctx.ModuleErrorf("depends on non-NDK-built library %q", ctx.ModuleErrorf("depends on non-NDK-built library %q",
ctx.OtherModuleName(to)) ctx.OtherModuleName(to))
return
} }
// At this point we know we have two NDK libraries, but we need to // At this point we know we have two NDK libraries, but we need to