summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2021-01-25 19:55:14 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2021-01-25 19:55:14 +0000
commitfb19f07bfd6506c18a8ced4599b7c661b7ea06be (patch)
treee731e1b39185e58a7a993cfa532d5fff75985293
parent2f322d73fe341c869f5401f6795e90316d6fdcf9 (diff)
parent79acc6308d9e493747ee50a8c5100aedcd84f66f (diff)
downloadzlib-fb19f07bfd6506c18a8ced4599b7c661b7ea06be.tar.gz
Snap for 7101549 from 79acc6308d9e493747ee50a8c5100aedcd84f66f to sc-v2-release
Change-Id: Ie967d0cc84676176788ef0d465374684c5fc64f0
-rw-r--r--Android.bp66
1 files changed, 48 insertions, 18 deletions
diff --git a/Android.bp b/Android.bp
index 206bad9..b136616 100644
--- a/Android.bp
+++ b/Android.bp
@@ -65,6 +65,25 @@ srcs_x86 = [
// This optimization is applicable to arm64 and x86-64.
cflags_64 = ["-DINFLATE_CHUNK_READ_64LE"]
+libz_srcs = [
+ "adler32.c",
+ "compress.c",
+ "cpu_features.c",
+ "crc32.c",
+ "deflate.c",
+ "gzclose.c",
+ "gzlib.c",
+ "gzread.c",
+ "gzwrite.c",
+ "infback.c",
+ "inffast.c",
+ "inflate.c",
+ "inftrees.c",
+ "trees.c",
+ "uncompr.c",
+ "zutil.c",
+]
+
cc_defaults {
name: "libz_defaults",
@@ -80,24 +99,7 @@ cc_defaults {
],
stl: "none",
export_include_dirs: ["."],
- srcs: [
- "adler32.c",
- "compress.c",
- "cpu_features.c",
- "crc32.c",
- "deflate.c",
- "gzclose.c",
- "gzlib.c",
- "gzread.c",
- "gzwrite.c",
- "infback.c",
- "inffast.c",
- "inflate.c",
- "inftrees.c",
- "trees.c",
- "uncompr.c",
- "zutil.c",
- ],
+ srcs: libz_srcs,
arch: {
arm: {
@@ -172,6 +174,34 @@ cc_library {
},
}
+// A more stable build of libz. Build configuration of this library should be
+// the same for different targets. This is only used by imgdiff.
+
+cc_library {
+ name: "libz_stable",
+ visibility: [
+ "//bootable/recovery/applypatch",
+ "//bootable/recovery/tests",
+ ],
+ cflags: [
+ // We do support hidden visibility, so turn that on.
+ "-DHAVE_HIDDEN",
+ // We do support const, so turn that on.
+ "-DZLIB_CONST",
+ "-Wall",
+ "-Werror",
+ "-Wno-unused",
+ "-Wno-unused-parameter",
+ ],
+ stl: "none",
+ export_include_dirs: ["."],
+ srcs: libz_srcs,
+
+ host_supported: true,
+ vendor_available: true,
+ recovery_available: true,
+}
+
cc_binary_host {
name: "minigzip",
srcs: ["contrib/minigzip/minigzip.c"],