blob: 1ea125289394b29e6c56549f287bf8c3f5b9eeb3 [file] [log] [blame]
Colin Cross6b22aa52016-09-12 14:35:39 -07001//
2// Copyright (C) 2016 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
17art_cc_defaults {
Colin Cross6e95dd52016-09-12 15:37:10 -070018 name: "art_test_defaults",
19 host_supported: true,
Colin Crossafd3c9e2016-09-16 13:47:21 -070020 target: {
21 android_arm: {
22 relative_install_path: "art/arm",
23 },
24 android_arm64: {
25 relative_install_path: "art/arm64",
26 },
27 android_mips: {
28 relative_install_path: "art/mips",
29 },
30 android_mips64: {
31 relative_install_path: "art/mips64",
32 },
33 android_x86: {
34 relative_install_path: "art/x86",
35 },
36 android_x86_64: {
37 relative_install_path: "art/x86_64",
38 },
Colin Crossfd5428b2016-09-19 10:40:05 -070039 darwin: {
40 enabled: false,
41 },
Colin Crossafd3c9e2016-09-16 13:47:21 -070042 },
Dan Albertb5d36de2016-09-21 14:56:51 -070043 cflags: [
44 "-Wno-frame-larger-than=",
45 ],
Colin Crossafd3c9e2016-09-16 13:47:21 -070046}
47
48art_cc_defaults {
49 name: "art_gtest_defaults",
Colin Cross6e95dd52016-09-12 15:37:10 -070050 test_per_src: true,
51 // These really are gtests, but the gtest library comes from libart-gtest.so
52 gtest: false,
53 defaults: [
54 "art_defaults",
55 "art_debug_defaults",
Colin Crossafd3c9e2016-09-16 13:47:21 -070056 "art_test_defaults",
Colin Cross6e95dd52016-09-12 15:37:10 -070057 ],
58
59 shared_libs: [
60 "libartd",
61 "libartd-disassembler",
62 "libvixld-arm",
63 "libvixld-arm64",
64 "libart-gtest",
65
Andreas Gampe3fec9ac2016-09-13 10:47:28 -070066 "libbase",
Colin Cross6e95dd52016-09-12 15:37:10 -070067 "libicuuc",
68 "libicui18n",
69 "libnativehelper",
70 ],
71 whole_static_libs: [
72 "libsigchain",
73 ],
74 include_dirs: [
75 "art",
76 "art/cmdline",
77 ],
78
79 target: {
80 linux: {
81 ldflags: [
82 // Allow jni_compiler_test to find Java_MyClassNatives_bar
83 // within itself using dlopen(NULL, ...).
84 // Mac OS linker doesn't understand --export-dynamic.
85 "-Wl,--export-dynamic",
86 "-Wl,-u,Java_MyClassNatives_bar",
87 "-Wl,-u,Java_MyClassNatives_sbar",
88 ],
89 shared_libs: [
90 "libziparchive",
91 "libz-host",
92 ],
93 host_ldlibs: [
94 "-ldl",
95 "-lpthread",
96 ],
97 cflags: [
98 // gtest issue
99 "-Wno-used-but-marked-unused",
100 "-Wno-deprecated",
101 "-Wno-missing-noreturn",
102 ],
103 },
104 android: {
105 ldflags: [
106 // Allow jni_compiler_test to find Java_MyClassNatives_bar
107 // within itself using dlopen(NULL, ...).
108 "-Wl,--export-dynamic",
109 "-Wl,-u,Java_MyClassNatives_bar",
110 "-Wl,-u,Java_MyClassNatives_sbar",
111 ],
112 shared_libs: [
Dimitry Ivanov9642b1b2016-09-28 02:44:00 -0700113 "liblog",
Colin Cross6e95dd52016-09-12 15:37:10 -0700114 "libdl",
115 "libz",
116 ],
117 cflags: [
118 // gtest issue
119 "-Wno-used-but-marked-unused",
120 "-Wno-deprecated",
121 "-Wno-missing-noreturn",
122 ],
123 },
Colin Cross6e95dd52016-09-12 15:37:10 -0700124 },
125}
126
127art_cc_defaults {
Colin Cross6b22aa52016-09-12 14:35:39 -0700128 name: "libart-gtest-defaults",
129 host_supported: true,
130 defaults: [
131 "art_defaults",
132 "art_debug_defaults",
133 ],
134 shared_libs: [
135 "libartd",
136 "libartd-compiler",
137 ],
138 static_libs: [
139 "libgtest",
140 ],
141 target: {
142 android32: {
Colin Crossc5c71872016-09-15 21:07:29 -0700143 cflags: ["-DART_TARGET_NATIVETEST_DIR=/data/nativetest/art"],
Colin Cross6b22aa52016-09-12 14:35:39 -0700144 },
145 android64: {
146 cflags: ["-DART_TARGET_NATIVETEST_DIR=/data/nativetest64/art"],
147 },
148 android: {
149 cflags: [
150 // gtest issue
151 "-Wno-used-but-marked-unused",
152 "-Wno-deprecated",
153 "-Wno-missing-noreturn",
154 ],
155 },
156 linux: {
157 cflags: [
158 // gtest issue
159 "-Wno-used-but-marked-unused",
160 "-Wno-deprecated",
161 "-Wno-missing-noreturn",
162 ],
163 },
Colin Cross942036f2016-09-15 16:24:51 -0700164 darwin: {
165 enabled: false,
166 },
Colin Cross6b22aa52016-09-12 14:35:39 -0700167 },
168}
169
170art_cc_library {
171 name: "libart-gtest",
172 host_supported: true,
173 whole_static_libs: [
174 "libart-compiler-gtest",
175 "libart-runtime-gtest",
176 "libgtest",
177 ],
178 shared_libs: [
179 "libartd",
180 "libartd-compiler",
Colin Crossf0af9062016-10-21 10:50:31 -0700181 "libbase",
Colin Cross6b22aa52016-09-12 14:35:39 -0700182 ],
183 target: {
184 android: {
185 shared_libs: [
186 "libdl",
187 ],
188 },
189 host: {
190 host_ldlibs: [
191 "-ldl",
192 "-lpthread",
193 ],
194 },
Colin Cross942036f2016-09-15 16:24:51 -0700195 darwin: {
196 enabled: false,
197 },
Colin Cross6b22aa52016-09-12 14:35:39 -0700198 },
199}
Colin Crossafd3c9e2016-09-16 13:47:21 -0700200
201cc_defaults {
202 name: "libartagent-defaults",
203 defaults: [
204 "art_defaults",
205 "art_test_defaults",
206 ],
207 shared_libs: [
208 "libbacktrace",
Andreas Gampe3fec9ac2016-09-13 10:47:28 -0700209 "libbase",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700210 "libnativehelper",
211 ],
212 target: {
213 android: {
214 shared_libs: ["libdl"],
215 },
216 host: {
217 host_ldlibs: [
218 "-ldl",
219 "-lpthread",
220 ],
221 },
222 },
223}
224
225art_cc_test_library {
226 name: "libartagent",
227 srcs: ["900-hello-plugin/load_unload.cc"],
228 defaults: ["libartagent-defaults"],
229 shared_libs: ["libart"],
230}
231
232art_cc_test_library {
233 name: "libartagentd",
234 srcs: ["900-hello-plugin/load_unload.cc"],
235 defaults: [
236 "libartagent-defaults",
237 "art_debug_defaults",
238 ],
239 shared_libs: ["libartd"],
240}
241
Andreas Gampee54d9922016-10-11 19:55:37 -0700242art_cc_defaults {
243 name: "libtiagent-defaults",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700244 defaults: ["libartagent-defaults"],
245 srcs: [
Alex Lightdba61482016-12-21 08:20:29 -0800246 // This is to get the IsInterpreted native method.
247 "common/stack_inspect.cc",
248 "common/runtime_state.cc",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700249 "ti-agent/common_load.cc",
Alex Light1e07ca62016-12-02 11:40:56 -0800250 "ti-agent/common_helper.cc",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700251 "901-hello-ti-agent/basics.cc",
Andreas Gampe6dee92e2016-09-12 19:58:13 -0700252 "903-hello-tagging/tagging.cc",
Andreas Gampe27fa96c2016-10-07 15:05:24 -0700253 "904-object-allocation/tracking.cc",
Andreas Gampecc13b222016-10-10 19:09:09 -0700254 "905-object-free/tracking_free.cc",
Andreas Gampee54d9922016-10-11 19:55:37 -0700255 "906-iterate-heap/iterate_heap.cc",
Andreas Gampeaa8b60c2016-10-12 12:51:25 -0700256 "907-get-loaded-classes/get_loaded_classes.cc",
Andreas Gampe9b8c5882016-10-21 15:27:46 -0700257 "908-gc-start-finish/gc_callbacks.cc",
Leonard Mosescueb842212016-10-06 17:26:36 -0700258 "909-attach-agent/attach.cc",
Andreas Gampe3c252f02016-10-27 18:25:17 -0700259 "910-methods/methods.cc",
Andreas Gampeb5eb94a2016-10-27 19:23:09 -0700260 "911-get-stack-trace/stack_trace.cc",
Andreas Gampee492ae32016-10-28 19:34:57 -0700261 "912-classes/classes.cc",
Andreas Gampe8da6d032016-10-31 19:31:03 -0700262 "913-heaps/heaps.cc",
Andreas Gampeab2f0d02017-01-05 17:23:45 -0800263 "918-fields/fields.cc",
Andreas Gampe50a4e492017-01-06 18:00:20 -0800264 "920-objects/objects.cc",
Andreas Gampe1bdaf732017-01-09 19:21:06 -0800265 "922-properties/properties.cc",
Andreas Gampe319dbe82017-01-09 16:42:21 -0800266 "923-monitors/monitors.cc",
Andreas Gampeaf13ab92017-01-11 20:57:40 -0800267 "924-threads/threads.cc",
Andreas Gampe35bcf812017-01-13 16:24:17 -0800268 "927-timers/timers.cc",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700269 ],
270 shared_libs: [
Andreas Gampe3fec9ac2016-09-13 10:47:28 -0700271 "libbase",
Andreas Gampee54d9922016-10-11 19:55:37 -0700272 ],
273}
274
275art_cc_test_library {
276 name: "libtiagent",
277 defaults: ["libtiagent-defaults"],
Andreas Gampe6e3dd3e2016-11-17 17:13:53 -0800278 shared_libs: ["libart"],
Colin Crossafd3c9e2016-09-16 13:47:21 -0700279}
280
281art_cc_test_library {
282 name: "libtiagentd",
283 defaults: [
Andreas Gampee54d9922016-10-11 19:55:37 -0700284 "libtiagent-defaults",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700285 "art_debug_defaults",
286 ],
Andreas Gampe6e3dd3e2016-11-17 17:13:53 -0800287 shared_libs: ["libartd"],
Colin Crossafd3c9e2016-09-16 13:47:21 -0700288}
289
290cc_defaults {
291 name: "libarttest-defaults",
292 defaults: [
293 "art_defaults",
294 "art_test_defaults",
295 ],
296 srcs: [
297 "common/runtime_state.cc",
298 "common/stack_inspect.cc",
299 "004-JniTest/jni_test.cc",
300 "004-SignalTest/signaltest.cc",
301 "004-ReferenceMap/stack_walk_refmap_jni.cc",
302 "004-StackWalk/stack_walk_jni.cc",
303 "004-ThreadStress/thread_stress.cc",
304 "004-UnsafeTest/unsafe_test.cc",
305 "044-proxy/native_proxy.cc",
306 "051-thread/thread_test.cc",
307 "117-nopatchoat/nopatchoat.cc",
308 "1337-gc-coverage/gc_coverage.cc",
309 "136-daemon-jni-shutdown/daemon_jni_shutdown.cc",
310 "137-cfi/cfi.cc",
311 "139-register-natives/regnative.cc",
312 "141-class-unload/jni_unload.cc",
313 "148-multithread-gc-annotations/gc_coverage.cc",
314 "149-suspend-all-stress/suspend_all.cc",
315 "454-get-vreg/get_vreg_jni.cc",
316 "457-regs/regs_jni.cc",
317 "461-get-reference-vreg/get_reference_vreg_jni.cc",
318 "466-get-live-vreg/get_live_vreg_jni.cc",
319 "497-inlining-and-class-loader/clear_dex_cache.cc",
320 "543-env-long-ref/env_long_ref.cc",
321 "566-polymorphic-inlining/polymorphic_inline.cc",
322 "570-checker-osr/osr.cc",
323 "595-profile-saving/profile-saving.cc",
324 "596-app-images/app_images.cc",
325 "597-deopt-new-string/deopt.cc",
Vladimir Markoc5798bf2016-12-09 10:20:54 +0000326 "626-const-class-linking/clear_dex_cache_types.cc",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700327 ],
328 shared_libs: [
329 "libbacktrace",
Andreas Gampe3fec9ac2016-09-13 10:47:28 -0700330 "libbase",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700331 "libnativehelper",
332 ],
333 target: {
334 android: {
335 shared_libs: ["libdl"],
336 },
337 host: {
338 host_ldlibs: [
339 "-ldl",
340 "-lpthread",
341 ],
342 },
343 },
344}
345
346art_cc_test_library {
347 name: "libarttest",
348 defaults: ["libarttest-defaults"],
349 shared_libs: ["libart"],
350}
351
352art_cc_test_library {
353 name: "libarttestd",
354 defaults: [
355 "libarttest-defaults",
356 "art_debug_defaults",
357 ],
358 shared_libs: ["libartd"],
359}
360
361art_cc_test_library {
362 name: "libnativebridgetest",
363 shared_libs: ["libart"],
364 defaults: [
365 "art_defaults",
366 "art_debug_defaults",
367 "art_test_defaults",
368 ],
369 srcs: ["115-native-bridge/nativebridge.cc"],
370 target: {
371 android: {
372 shared_libs: ["libdl"],
373 },
374 host: {
375 host_ldlibs: [
376 "-ldl",
377 "-lpthread",
378 ],
379 },
380 linux: {
381 host_ldlibs: ["-lrt"],
382 },
383 },
384}