Upgrade lz4 to v1.10.0
This project was upgraded with external_updater.
Usage: tools/external_updater/updater.sh update external/lz4
For more info, check https://cs.android.com/android/platform/superproject/main/+/main:tools/external_updater/README.md
Test: TreeHugger
Change-Id: I15d44917fb2b4421950dcd54625ca23dbfc3ec5e
diff --git a/METADATA b/METADATA
new file mode 100644
index 0000000..3fdd33f
--- /dev/null
+++ b/METADATA
@@ -0,0 +1,19 @@
+# This project was upgraded with external_updater.
+# Usage: tools/external_updater/updater.sh update external/lz4
+# For more info, check https://cs.android.com/android/platform/superproject/main/+/main:tools/external_updater/README.md
+
+name: "lz4"
+description: "Extremely Fast Compression algorithm http://www.lz4.org"
+third_party {
+ license_type: RESTRICTED
+ last_upgrade_date {
+ year: 2024
+ month: 10
+ day: 1
+ }
+ identifier {
+ type: "Git"
+ value: "https://github.com/lz4/lz4.git"
+ version: "v1.10.0"
+ }
+}
diff --git a/MODULE_LICENSE_GPL b/MODULE_LICENSE_GPL
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/MODULE_LICENSE_GPL
diff --git a/OWNERS b/OWNERS
new file mode 100644
index 0000000..7529cb9
--- /dev/null
+++ b/OWNERS
@@ -0,0 +1 @@
+include platform/system/core:/janitors/OWNERS
diff --git a/lib/Android.bp b/lib/Android.bp
new file mode 100644
index 0000000..007ebd7
--- /dev/null
+++ b/lib/Android.bp
@@ -0,0 +1,53 @@
+// Copyright (C) 2015 The Android Open Source Project
+
+package {
+ default_applicable_licenses: ["external_lz4_lib_license"],
+}
+
+// Added automatically by a large-scale-change
+license {
+ name: "external_lz4_lib_license",
+ visibility: [":__subpackages__"],
+ license_kinds: [
+ "SPDX-license-identifier-BSD",
+ ],
+ license_text: [
+ "LICENSE",
+ ],
+}
+
+cc_library {
+ name: "liblz4",
+ min_sdk_version: "apex_inherit",
+ apex_available: [
+ "//apex_available:platform",
+ "com.android.adbd",
+ "com.android.art", // from libartbase
+ "com.android.art.debug",
+ "com.android.virt",
+ ],
+ recovery_available: true,
+ vendor_available: true,
+ product_available: true,
+ ramdisk_available: true,
+ vendor_ramdisk_available: true,
+ host_supported: true,
+ // TODO(b/153609531): remove when no longer needed.
+ native_bridge_supported: true,
+ target: {
+ windows: {
+ enabled: true,
+ shared: {
+ enabled: false,
+ },
+ },
+ },
+ srcs: [
+ "lz4.c",
+ "lz4hc.c",
+ "lz4frame.c",
+ "xxhash.c",
+ ],
+ cflags: ["-Wall", "-Werror"],
+ export_include_dirs: ["."],
+}
diff --git a/lib/MODULE_LICENSE_BSD b/lib/MODULE_LICENSE_BSD
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/lib/MODULE_LICENSE_BSD
diff --git a/programs/Android.bp b/programs/Android.bp
new file mode 100644
index 0000000..7820a1c
--- /dev/null
+++ b/programs/Android.bp
@@ -0,0 +1,53 @@
+package {
+ default_applicable_licenses: ["external_lz4_programs_license"],
+}
+
+license {
+ name: "external_lz4_programs_license",
+ visibility: [":__subpackages__"],
+ license_kinds: [
+ "SPDX-license-identifier-GPL",
+ "SPDX-license-identifier-GPL-2.0",
+ "SPDX-license-identifier-LGPL",
+ ],
+ license_text: [
+ "COPYING",
+ ],
+}
+
+cc_binary_host {
+ name: "lz4",
+ srcs: [
+ "bench.c",
+ "lz4io.c",
+ "lz4cli.c",
+ "timefn.c",
+ "threadpool.c",
+ "lorem.c",
+ ],
+ cflags: [
+ "-Wall",
+ "-Werror",
+ ],
+ static_libs: ["liblz4"],
+ stl: "libc++_static",
+}
+
+cc_binary_host {
+ name: "lz4c",
+ cflags: [
+ "-DENABLE_LZ4C_LEGACY_OPTIONS",
+ "-Wall",
+ "-Werror",
+ ],
+ srcs: [
+ "bench.c",
+ "lz4io.c",
+ "lz4cli.c",
+ "timefn.c",
+ "threadpool.c",
+ "lorem.c",
+ ],
+ static_libs: ["liblz4"],
+ stl: "libc++_static",
+}