blob: 06fd19e2fe1767238cd26666175361266a9764a2 [file] [log] [blame]
David Sehr334b9d72018-02-12 18:27:56 -08001//
2// Copyright (C) 2011 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15//
16
17cc_defaults {
18 name: "libdexfile_defaults",
19 defaults: ["art_defaults"],
20 host_supported: true,
21 srcs: [
David Sehr1f010162018-05-15 08:59:32 -070022 "dex/art_dex_file_loader.cc",
David Sehr334b9d72018-02-12 18:27:56 -080023 "dex/compact_dex_file.cc",
Mathieu Chartier5e3cfa22018-02-20 16:53:37 -080024 "dex/compact_offset_table.cc",
David Sehr334b9d72018-02-12 18:27:56 -080025 "dex/descriptors_names.cc",
26 "dex/dex_file.cc",
27 "dex/dex_file_exception_helpers.cc",
David Sehrc431b9d2018-03-02 12:01:51 -080028 "dex/dex_file_layout.cc",
David Sehr334b9d72018-02-12 18:27:56 -080029 "dex/dex_file_loader.cc",
30 "dex/dex_file_tracking_registrar.cc",
31 "dex/dex_file_verifier.cc",
32 "dex/dex_instruction.cc",
33 "dex/modifiers.cc",
David Sehr67bf42e2018-02-26 16:43:04 -080034 "dex/primitive.cc",
David Sehr334b9d72018-02-12 18:27:56 -080035 "dex/standard_dex_file.cc",
David Sehr9c4a0152018-04-05 12:23:54 -070036 "dex/type_lookup_table.cc",
David Sehr334b9d72018-02-12 18:27:56 -080037 "dex/utf.cc",
38 ],
39
40 target: {
41 android: {
42 static_libs: [
43 "libziparchive",
44 "libz",
David Sehr334b9d72018-02-12 18:27:56 -080045 ],
46 shared_libs: [
47 "libutils",
48 ],
49 },
50 host: {
51 shared_libs: [
52 "libziparchive",
53 "libz",
54 ],
55 },
56 },
57 generated_sources: ["dexfile_operator_srcs"],
58 shared_libs: [
David Sehr1f010162018-05-15 08:59:32 -070059 // For MemMap.
David Sehr2300b2d2018-05-10 14:20:10 -070060 "libartbase",
David Sehr334b9d72018-02-12 18:27:56 -080061 "liblog",
David Sehr1f010162018-05-15 08:59:32 -070062 // For atrace.
63 "libcutils",
David Sehr334b9d72018-02-12 18:27:56 -080064 // For common macros.
65 "libbase",
66 "libz",
67 ],
David Sehr334b9d72018-02-12 18:27:56 -080068 export_include_dirs: ["."],
69 export_shared_lib_headers: [
David Sehr1f010162018-05-15 08:59:32 -070070 "libartbase",
David Sehr334b9d72018-02-12 18:27:56 -080071 "libbase",
72 ],
73}
74
75gensrcs {
76 name: "dexfile_operator_srcs",
Alex Lightb69d2d32018-02-21 13:37:17 -080077 cmd: "$(location generate_operator_out) art/libdexfile $(in) > $(out)",
78 tools: ["generate_operator_out"],
David Sehr334b9d72018-02-12 18:27:56 -080079 srcs: [
80 "dex/dex_file.h",
David Sehrc431b9d2018-03-02 12:01:51 -080081 "dex/dex_file_layout.h",
David Sehr334b9d72018-02-12 18:27:56 -080082 "dex/dex_instruction.h",
83 "dex/dex_instruction_utils.h",
84 "dex/invoke_type.h",
David Sehr312f3b22018-03-19 08:39:26 -070085 "dex/method_reference.h",
David Sehr334b9d72018-02-12 18:27:56 -080086 ],
87 output_extension: "operator_out.cc",
88}
89
David Sehr334b9d72018-02-12 18:27:56 -080090art_cc_library {
91 name: "libdexfile",
92 defaults: ["libdexfile_defaults"],
93 // Leave the symbols in the shared library so that stack unwinders can
94 // produce meaningful name resolution.
95 strip: {
96 keep_symbols: true,
97 },
98}
99
David Sehrfcbe15c2018-02-15 09:41:13 -0800100art_cc_library {
101 name: "libdexfiled",
102 defaults: [
103 "art_debug_defaults",
104 "libdexfile_defaults",
105 ],
106}
107
David Sehr334b9d72018-02-12 18:27:56 -0800108art_cc_test {
109 name: "art_libdexfile_tests",
110 defaults: [
111 "art_gtest_defaults",
112 ],
113 srcs: [
David Sehr1f010162018-05-15 08:59:32 -0700114 "dex/art_dex_file_loader_test.cc",
Mathieu Chartier0d896bd2018-05-25 00:20:27 -0700115 "dex/class_accessor_test.cc",
David Sehr334b9d72018-02-12 18:27:56 -0800116 "dex/code_item_accessors_test.cc",
David Sehr334b9d72018-02-12 18:27:56 -0800117 "dex/compact_dex_file_test.cc",
Mathieu Chartier5e3cfa22018-02-20 16:53:37 -0800118 "dex/compact_offset_table_test.cc",
David Sehrb2ec9f52018-02-21 13:20:31 -0800119 "dex/descriptors_names_test.cc",
David Sehr312f3b22018-03-19 08:39:26 -0700120 "dex/test_dex_file_builder_test.cc",
David Sehr334b9d72018-02-12 18:27:56 -0800121 "dex/dex_file_loader_test.cc",
122 "dex/dex_file_verifier_test.cc",
123 "dex/dex_instruction_test.cc",
David Sehr67bf42e2018-02-26 16:43:04 -0800124 "dex/primitive_test.cc",
David Sehr312f3b22018-03-19 08:39:26 -0700125 "dex/string_reference_test.cc",
David Sehr9c4a0152018-04-05 12:23:54 -0700126 "dex/type_lookup_table_test.cc",
David Sehr334b9d72018-02-12 18:27:56 -0800127 "dex/utf_test.cc",
128 ],
129 shared_libs: [
130 "libbacktrace",
131 "libziparchive",
132 ],
133 include_dirs: [
134 "external/zlib",
135 ],
136}