Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/android-ndk-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
distribution: 'temurin'

- name: Setup Android SDK
uses: android-actions/setup-android@9fc6c4e9069bf8d3d10b2204b1fb8f6ef7065407 # v3.2.2
uses: android-actions/setup-android@40fd30fb8d7440372e1316f5d1809ec01dcd3699 # v4.0.1

- name: Install Android NDK
run: |
Expand Down
56 changes: 49 additions & 7 deletions Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ cc_library {
"//external/elfutils:__subpackages__",
"//external/libbpf:__subpackages__",
"//external/mesa3d:__subpackages__",
"//external/rsync:__subpackages__",
"//external/squashfs-tools/squashfs-tools:__subpackages__",
"//external/stg:__subpackages__",
"//frameworks/libs/binary_translation/tools:__subpackages__",
Expand Down Expand Up @@ -109,15 +110,56 @@ cc_library {
export_include_dirs: ["lib"],
}

cc_binary_host {
cc_binary {
name: "zstd",
defaults: ["zstd_defaults"],
srcs: [
"programs/*.c",
// Rebuild the whole library as part of the binary to enable multithreading.
"lib/*/*.c",
],
cflags: ["-DZSTD_MULTITHREAD=1"],
system_ext_specific: true,
host_supported: true,
target: {
android: {
srcs: ["programs/*.c"],
cflags: [
"-DZSTD_GZCOMPRESS",
"-DZSTD_GZDECOMPRESS",
"-DZSTD_LZ4COMPRESS",
"-DZSTD_LZ4DECOMPRESS",
"-DZSTD_MULTITHREAD",
"-Wall",
"-Werror",
],
shared_libs: [
"liblz4",
"libz",
"libzstd",
],
required: ["zstdgrep", "zstdless"],
symlinks: [
"zstdcat",
"zstdmt",
"unzstd",
],
},
host: {
srcs: [
"programs/*.c",
// Rebuild the whole library as part of the binary to enable multithreading.
"lib/*/*.c",
],
cflags: ["-DZSTD_MULTITHREAD=1"],
},
},
}

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

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

cc_defaults {
Expand Down