diff options
author | Kelvin Zhang <zhangkelvin@google.com> | 2021-01-14 15:04:35 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2021-01-14 15:04:35 +0000 |
commit | 0a3c0efda6c8145f3a5d9ab3794b35dad1dfbfb0 (patch) | |
tree | e731e1b39185e58a7a993cfa532d5fff75985293 | |
parent | 4fa66caa136303294cabb33a634c6ccf18926280 (diff) | |
parent | e6a6dbd05cbeea0f20a77095b98a4817a3708a87 (diff) | |
download | zlib-0a3c0efda6c8145f3a5d9ab3794b35dad1dfbfb0.tar.gz |
Merge "Add a libz_stable variant"
-rw-r--r-- | Android.bp | 66 |
1 files changed, 48 insertions, 18 deletions
@@ -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"], |