blob: 2dcbeed9f1c8acffe5af385ac3fe2eff0a845c05 [file] [log] [blame]
Colin Cross44bb3ea2016-07-11 16:24:15 -07001// Copyright (C) 2008 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
Bob Badour8a97fe02021-02-12 14:17:16 -080015package {
16 default_applicable_licenses: ["external_bzip2_license"],
17}
18
19// Added automatically by a large-scale-change that took the approach of
20// 'apply every license found to every target'. While this makes sure we respect
21// every license restriction, it may not be entirely correct.
22//
23// e.g. GPL in an MIT project might only apply to the contrib/ directory.
24//
25// Please consider splitting the single license below into multiple licenses,
26// taking care not to lose any license_kind information, and overriding the
27// default license using the 'licenses: [...]' property on targets as needed.
28//
29// For unused files, consider creating a 'fileGroup' with "//visibility:private"
30// to attach the license to, and including a comment whether the files may be
31// used in the current project.
32//
33// large-scale-change filtered out the below license kinds as false-positives:
34// SPDX-license-identifier-GPL
35// SPDX-license-identifier-OFL
36// See: http://go/android-license-faq
37license {
38 name: "external_bzip2_license",
39 visibility: [":__subpackages__"],
40 license_kinds: [
41 "SPDX-license-identifier-BSD",
42 "legacy_unencumbered",
43 ],
44 license_text: [
45 "LICENSE",
46 ],
47}
48
Bill Peckham9f8ec252019-10-17 18:03:15 -070049cc_library_static {
Colin Cross44bb3ea2016-07-11 16:24:15 -070050 name: "libbz",
51 host_supported: true,
Bill Peckham43b1a422019-09-17 16:49:41 -070052 vendor_available: true,
Dan Willemsena04d8e92018-10-23 13:44:08 -070053 recovery_available: true,
Bill Peckham9f8ec252019-10-17 18:03:15 -070054 visibility: [
55 "//bootable/recovery:__subpackages__",
56 "//external/bsdiff:__subpackages__",
57 "//external/puffin:__subpackages__",
58 "//system/update_engine:__subpackages__",
David Anderson30d23f82020-08-06 13:57:44 -070059 "//system/core/fs_mgr/libsnapshot:__subpackages__",
Yuntao Xu81084e12022-01-11 13:09:56 -080060 "//vendor:__subpackages__",
Bill Peckham9f8ec252019-10-17 18:03:15 -070061 ],
Colin Cross44bb3ea2016-07-11 16:24:15 -070062 arch: {
63 arm: {
64 // measurements show that the ARM version of ZLib is about x1.17 faster
65 // than the thumb one...
66 instruction_set: "arm",
67 },
68 },
69 cflags: [
70 "-O3",
71 "-DUSE_MMAP",
Chih-Hung Hsieh0f5d30b2017-09-27 10:30:39 -070072 "-Werror",
Colin Cross44bb3ea2016-07-11 16:24:15 -070073 "-Wno-unused-parameter",
74 ],
75 export_include_dirs: ["."],
76 srcs: [
77 "blocksort.c",
78 "bzlib.c",
79 "compress.c",
80 "crctable.c",
81 "decompress.c",
82 "huffman.c",
83 "randtable.c",
84 ],
85 sdk_version: "9",
86 stl: "none",
87}
Elliott Hughes9fa5f2d2017-03-27 22:58:44 -070088
89cc_binary {
90 name: "bzip2",
Elliott Hughes3a0c8892019-02-19 12:49:59 -080091 host_supported: true,
92
Elliott Hughes9fa5f2d2017-03-27 22:58:44 -070093 cflags: [
Chih-Hung Hsieh0f5d30b2017-09-27 10:30:39 -070094 "-Werror",
Elliott Hughes9fa5f2d2017-03-27 22:58:44 -070095 "-Wno-unused-parameter",
96 ],
Elliott Hughes834d8f22019-09-23 12:08:19 -070097 static_libs: ["libbz"],
Elliott Hughes3a0c8892019-02-19 12:49:59 -080098 srcs: ["bzip2.c"],
99 stl: "none",
Elliott Hughes9fa5f2d2017-03-27 22:58:44 -0700100 symlinks: [
101 "bunzip2",
102 "bzcat",
103 ],
104}