blob: b9aefdd18191b780b01b641b4c6f6fb3107b9b2d [file] [log] [blame]
Dan Albert7ce8df32016-09-23 16:43:49 -07001// Copyright (C) 2016 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
Colin Cross02a86572017-10-07 18:38:31 -070015cc_library_shared {
16 name: "libjnigraphics",
17
18 cflags: [
19 "-Wall",
20 "-Werror",
21 "-Wunused",
22 "-Wunreachable-code",
23 ],
24
Leon Scroggins III9732e292019-12-16 10:26:57 -050025 srcs: [
Leon Scroggins III407b5442019-11-22 17:10:20 -050026 "imagedecoder.cpp",
Leon Scroggins III9732e292019-12-16 10:26:57 -050027 ],
Colin Cross02a86572017-10-07 18:38:31 -070028
29 shared_libs: [
30 "libandroid_runtime",
Leon Scroggins III407b5442019-11-22 17:10:20 -050031 "libhwui",
Leon Scroggins III9732e292019-12-16 10:26:57 -050032 "liblog",
Colin Cross02a86572017-10-07 18:38:31 -070033 ],
Ian Pedowitz0c3c4d12018-01-18 16:24:11 -080034
Leon Scroggins IIIc72d0fb2020-12-30 16:38:23 -050035 header_libs: [
36 "libhwui_internal_headers",
37 "jni_headers",
38 ],
Derek Sollenbergeree538a32020-02-19 11:51:17 -050039
Leon Scroggins III407b5442019-11-22 17:10:20 -050040 static_libs: ["libarect"],
41
Ian Pedowitz0c3c4d12018-01-18 16:24:11 -080042 arch: {
43 arm: {
44 // TODO: This is to work around b/24465209. Remove after root cause is fixed
Chih-Hung Hsieheeb1ea82018-05-22 21:37:08 -070045 pack_relocations: false,
Ian Pedowitz0c3c4d12018-01-18 16:24:11 -080046 ldflags: ["-Wl,--hash-style=both"],
47 },
48 },
Leon Scroggins IIIc72d0fb2020-12-30 16:38:23 -050049 host_supported: true,
50 target: {
51 android: {
52 srcs: [
53 "aassetstreamadaptor.cpp",
54 "bitmap.cpp",
55 ],
56 shared_libs: [
57 "libandroid",
58 ],
59 version_script: "libjnigraphics.map.txt",
60 },
61 host: {
62 header_libs: [
63 "libnativewindow_headers",
64 ],
65 },
66 },
Colin Cross02a86572017-10-07 18:38:31 -070067}
68
Dan Albert7ce8df32016-09-23 16:43:49 -070069// The headers module is in frameworks/native/Android.bp.
70ndk_library {
Dan Willemsen3dcf0312017-04-07 15:48:45 -070071 name: "libjnigraphics",
Dan Albert7ce8df32016-09-23 16:43:49 -070072 symbol_file: "libjnigraphics.map.txt",
73 first_version: "9",
Dan Albert98e462d2017-01-05 16:01:14 -080074 unversioned_until: "current",
Dan Albert7ce8df32016-09-23 16:43:49 -070075}
Leon Scroggins III140f5082020-02-26 17:15:12 -050076
77cc_fuzz {
78 name: "imagedecoder_fuzzer",
79 srcs: ["fuzz_imagedecoder.cpp"],
80 header_libs: ["jni_headers"],
81 shared_libs: [
82 "libbinder",
83 "libjnigraphics",
84 "libutils",
85 ],
86 static_libs: ["libarect"],
87 fuzz_config: {
88 cc: ["scroggo@google.com"],
Leon Scroggins IIIc72d0fb2020-12-30 16:38:23 -050089 asan_options: [
90 "detect_odr_violation=1",
91 ],
Leon Scroggins III140f5082020-02-26 17:15:12 -050092 },
Leon Scroggins IIIcc60f0d2020-03-06 11:08:35 -050093 corpus: ["corpus/*"],
Leon Scroggins IIIc72d0fb2020-12-30 16:38:23 -050094 host_supported: true,
Leon Scroggins III140f5082020-02-26 17:15:12 -050095}