Skip to content

Commit 0c4888a

Browse files
DroidFreak32AnandSuresh02
authored andcommitted
zstd: Allow to build zstd cmdline tools
Test: mka zstd Change-Id: Ic5f3e9bf2ff7e9188c1974d1b0ec81204e9cbd91
1 parent 34edb25 commit 0c4888a

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

Android.bp

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,49 @@ license {
4141
],
4242
}
4343

44+
cc_binary {
45+
name: "zstd",
46+
47+
cflags: [
48+
"-DZSTD_GZCOMPRESS",
49+
"-DZSTD_GZDECOMPRESS",
50+
"-DZSTD_LZ4COMPRESS",
51+
"-DZSTD_LZ4DECOMPRESS",
52+
"-DZSTD_MULTITHREAD",
53+
"-Wall",
54+
"-Werror",
55+
],
56+
57+
shared_libs: [
58+
"liblz4",
59+
"libz",
60+
"libzstd",
61+
],
62+
63+
srcs: ["programs/*.c"],
64+
system_ext_specific: true,
65+
66+
required: ["zstdgrep", "zstdless"],
67+
68+
symlinks: [
69+
"zstdcat",
70+
"zstdmt",
71+
"unzstd",
72+
],
73+
}
74+
75+
sh_binary {
76+
name: "zstdgrep",
77+
src: "programs/zstdgrep",
78+
system_ext_specific: true,
79+
}
80+
81+
sh_binary {
82+
name: "zstdless",
83+
src: "programs/zstdless",
84+
system_ext_specific: true,
85+
}
86+
4487
cc_library {
4588
name: "libzstd",
4689
min_sdk_version: "apex_inherit",
@@ -116,6 +159,7 @@ cc_defaults {
116159
"lib/dictBuilder",
117160
"tests/fuzz",
118161
],
162+
system_ext_specific: true,
119163
cflags: [
120164
"-Wno-error",
121165
"-Wno-pointer-arith",

0 commit comments

Comments
 (0)