From 2478e4e98f2567fd277b6c19f5d0c022d8abd7d8 Mon Sep 17 00:00:00 2001 From: Jiyong Park Date: Mon, 18 May 2020 09:30:14 +0000 Subject: [PATCH] Revert "Revert "Allow libz to have stub even though it's not an ..." Revert submission 1313718-revert-1312595-zlib_as_stub-BVNRLZPNBJ Reason for revert: relanding Reverted Changes: I0cf486d9b:Revert "libz provides stubs to Mainline modules." I412132f8a:Revert "libz is a stub" I617eb90a3:Revert "Allow libz to have stub even though it's n... Exempt-From-Owner-Approval: this is a clean relanding. Test: m Change-Id: Ib09a615bd11cf2647dcad42108adfcfc5040940f --- cc/vndk.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cc/vndk.go b/cc/vndk.go index dbe1f3b5b..e5e453305 100644 --- a/cc/vndk.go +++ b/cc/vndk.go @@ -309,7 +309,13 @@ func processVndkLibrary(mctx android.BottomUpMutatorContext, m *Module) { panic(err) } - if m.HasStubsVariants() { + if m.HasStubsVariants() && name != "libz" { + // b/155456180 libz is the ONLY exception here. We don't want to make + // libz an LLNDK library because we in general can't guarantee that + // libz will behave consistently especially about the compression. + // i.e. the compressed output might be different across releases. + // As the library is an external one, it's risky to keep the compatibility + // promise if it becomes an LLNDK. mctx.PropertyErrorf("vndk.enabled", "This library provides stubs. Shouldn't be VNDK. Consider making it as LLNDK") }