Skip to content

Commit

Permalink
zstd: Allow to build zstd cmdline tools
Browse files Browse the repository at this point in the history
Test: mka zstd

Change-Id: Ic5f3e9bf2ff7e9188c1974d1b0ec81204e9cbd91
  • Loading branch information
DroidFreak32 authored and toufune committed Sep 24, 2024
1 parent 34edb25 commit 1c30bf8
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,49 @@ license {
],
}

cc_binary {
name: "zstd",

cflags: [
"-DZSTD_GZCOMPRESS",
"-DZSTD_GZDECOMPRESS",
"-DZSTD_LZ4COMPRESS",
"-DZSTD_LZ4DECOMPRESS",
"-DZSTD_MULTITHREAD",
"-Wall",
"-Werror",
],

shared_libs: [
"liblz4",
"libz",
"libzstd",
],

srcs: ["programs/*.c"],
system_ext_specific: true,

required: ["zstdgrep", "zstdless"],

symlinks: [
"zstdcat",
"zstdmt",
"unzstd",
],
}

sh_binary {
name: "zstdgrep",
src: "programs/zstdgrep",
system_ext_specific: true,
}

sh_binary {
name: "zstdless",
src: "programs/zstdless",
system_ext_specific: true,
}

cc_library {
name: "libzstd",
min_sdk_version: "apex_inherit",
Expand Down Expand Up @@ -116,6 +159,7 @@ cc_defaults {
"lib/dictBuilder",
"tests/fuzz",
],
system_ext_specific: true,
cflags: [
"-Wno-error",
"-Wno-pointer-arith",
Expand Down

0 comments on commit 1c30bf8

Please sign in to comment.