blob: 7413ee50b366ff60aaa34ae4f7465426bc502438 [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: [
Colin Crossafd3c9e2016-09-16 13:47:21 -070054 "art_test_defaults",
Andreas Gampe5115efb2017-05-24 16:55:54 -070055 "art_debug_defaults",
56 "art_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: [
Colin Cross6b22aa52016-09-12 14:35:39 -0700131 "art_debug_defaults",
Andreas Gampe5115efb2017-05-24 16:55:54 -0700132 "art_defaults",
Colin Cross6b22aa52016-09-12 14:35:39 -0700133 ],
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",
Calin Juravle36eb3132017-01-13 16:32:38 -0800176 "libgtest"
Colin Cross6b22aa52016-09-12 14:35:39 -0700177 ],
178 shared_libs: [
179 "libartd",
180 "libartd-compiler",
Colin Crossf0af9062016-10-21 10:50:31 -0700181 "libbase",
Calin Juravle36eb3132017-01-13 16:32:38 -0800182 "libbacktrace"
Colin Cross6b22aa52016-09-12 14:35:39 -0700183 ],
184 target: {
185 android: {
186 shared_libs: [
187 "libdl",
188 ],
189 },
190 host: {
191 host_ldlibs: [
192 "-ldl",
193 "-lpthread",
194 ],
195 },
Colin Cross942036f2016-09-15 16:24:51 -0700196 darwin: {
197 enabled: false,
198 },
Colin Cross6b22aa52016-09-12 14:35:39 -0700199 },
200}
Colin Crossafd3c9e2016-09-16 13:47:21 -0700201
202cc_defaults {
203 name: "libartagent-defaults",
204 defaults: [
Colin Crossafd3c9e2016-09-16 13:47:21 -0700205 "art_test_defaults",
Andreas Gampe5115efb2017-05-24 16:55:54 -0700206 "art_defaults",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700207 ],
208 shared_libs: [
209 "libbacktrace",
Andreas Gampe3fec9ac2016-09-13 10:47:28 -0700210 "libbase",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700211 "libnativehelper",
212 ],
213 target: {
214 android: {
215 shared_libs: ["libdl"],
216 },
217 host: {
218 host_ldlibs: [
219 "-ldl",
220 "-lpthread",
221 ],
222 },
223 },
224}
225
226art_cc_test_library {
227 name: "libartagent",
228 srcs: ["900-hello-plugin/load_unload.cc"],
229 defaults: ["libartagent-defaults"],
230 shared_libs: ["libart"],
231}
232
233art_cc_test_library {
234 name: "libartagentd",
235 srcs: ["900-hello-plugin/load_unload.cc"],
236 defaults: [
Colin Crossafd3c9e2016-09-16 13:47:21 -0700237 "art_debug_defaults",
Andreas Gampe5115efb2017-05-24 16:55:54 -0700238 "libartagent-defaults",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700239 ],
240 shared_libs: ["libartd"],
241}
242
Andreas Gampee54d9922016-10-11 19:55:37 -0700243art_cc_defaults {
Andreas Gampe027444b2017-03-31 12:49:07 -0700244 name: "libtiagent-base-defaults",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700245 defaults: ["libartagent-defaults"],
246 srcs: [
Andreas Gampe027444b2017-03-31 12:49:07 -0700247 // These are the ART-independent parts.
Andreas Gampe46651672017-04-07 09:00:04 -0700248 "ti-agent/agent_common.cc",
Andreas Gampe027444b2017-03-31 12:49:07 -0700249 "ti-agent/agent_startup.cc",
Andreas Gampe3f46c962017-03-30 10:26:59 -0700250 "ti-agent/jni_binder.cc",
251 "ti-agent/jvmti_helper.cc",
252 "ti-agent/test_env.cc",
Alex Lightd0d65962017-06-30 11:13:33 -0700253 "ti-agent/breakpoint_helper.cc",
Alex Light78d63412017-04-14 16:20:53 -0700254 "ti-agent/common_helper.cc",
Alex Light47d49b82017-07-25 14:06:34 -0700255 "ti-agent/locals_helper.cc",
Alex Lightd0d65962017-06-30 11:13:33 -0700256 "ti-agent/redefinition_helper.cc",
Alex Light88fd7202017-06-30 08:31:59 -0700257 "ti-agent/suspension_helper.cc",
Alex Light47d49b82017-07-25 14:06:34 -0700258 "ti-agent/stack_trace_helper.cc",
Alex Lightd0d65962017-06-30 11:13:33 -0700259 "ti-agent/trace_helper.cc",
Andreas Gampe027444b2017-03-31 12:49:07 -0700260 // This is the list of non-special OnLoad things and excludes BCI and anything that depends
261 // on ART internals.
Andreas Gampe6dee92e2016-09-12 19:58:13 -0700262 "903-hello-tagging/tagging.cc",
Andreas Gampe27fa96c2016-10-07 15:05:24 -0700263 "904-object-allocation/tracking.cc",
Andreas Gampecc13b222016-10-10 19:09:09 -0700264 "905-object-free/tracking_free.cc",
Andreas Gampee54d9922016-10-11 19:55:37 -0700265 "906-iterate-heap/iterate_heap.cc",
Andreas Gampeaa8b60c2016-10-12 12:51:25 -0700266 "907-get-loaded-classes/get_loaded_classes.cc",
Andreas Gampe9b8c5882016-10-21 15:27:46 -0700267 "908-gc-start-finish/gc_callbacks.cc",
Andreas Gampe3c252f02016-10-27 18:25:17 -0700268 "910-methods/methods.cc",
Andreas Gampeb5eb94a2016-10-27 19:23:09 -0700269 "911-get-stack-trace/stack_trace.cc",
Andreas Gamped5f2ccc2017-04-19 13:37:48 -0700270 "912-classes/classes.cc",
Andreas Gampee0f8ed92017-04-13 16:52:23 -0700271 "913-heaps/heaps.cc",
Andreas Gampeab2f0d02017-01-05 17:23:45 -0800272 "918-fields/fields.cc",
Andreas Gampe50a4e492017-01-06 18:00:20 -0800273 "920-objects/objects.cc",
Andreas Gampe1bdaf732017-01-09 19:21:06 -0800274 "922-properties/properties.cc",
Andreas Gampe319dbe82017-01-09 16:42:21 -0800275 "923-monitors/monitors.cc",
Andreas Gampeaf13ab92017-01-11 20:57:40 -0800276 "924-threads/threads.cc",
Andreas Gamped18d9e22017-01-16 16:08:45 +0000277 "925-threadgroups/threadgroups.cc",
Andreas Gampe35bcf812017-01-13 16:24:17 -0800278 "927-timers/timers.cc",
Andreas Gampe6f8e4f02017-01-16 18:18:14 -0800279 "928-jni-table/jni_table.cc",
Andreas Gampece7732b2017-01-17 15:50:26 -0800280 "929-search/search.cc",
Andreas Gampe732b0ac2017-01-18 15:23:39 -0800281 "931-agent-thread/agent_thread.cc",
Andreas Gampeeb0cea12017-01-23 08:50:04 -0800282 "933-misc-events/misc_events.cc",
Alex Light78d63412017-04-14 16:20:53 -0700283 "945-obsolete-native/obsolete_native.cc",
284 "984-obsolete-invoke/obsolete_invoke.cc",
Alex Lightd78ddec2017-04-18 15:20:38 -0700285 "986-native-method-bind/native_bind.cc",
Alex Light65af20b2017-04-20 09:15:08 -0700286 "987-agent-bind/agent_bind.cc",
Alex Lightb7edcda2017-04-27 13:20:31 -0700287 "989-method-trace-throw/method_trace.cc",
Alex Light7c958492017-06-16 08:59:19 -0700288 "991-field-trace-2/field_trace.cc",
Alex Light6fa7b812017-06-16 09:04:29 -0700289 "992-source-data/source_file.cc",
Alex Lightc38c3692017-06-27 15:45:14 -0700290 "993-breakpoints/breakpoints.cc",
291 "996-breakpoint-obsolete/obsolete_breakpoints.cc",
Alex Light8ddfd9f2017-07-05 16:33:46 -0700292 "1900-track-alloc/alloc.cc",
Alex Light4c174282017-07-05 10:18:18 -0700293 "1901-get-bytecodes/bytecodes.cc",
Alex Light88fd7202017-06-30 08:31:59 -0700294 "1905-suspend-native/native_suspend.cc",
295 "1908-suspend-native-resume-self/native_suspend_resume.cc",
Alex Light092a4042017-07-12 08:46:44 -0700296 "1909-per-agent-tls/agent_tls.cc",
Alex Light47d49b82017-07-25 14:06:34 -0700297 "1914-get-local-instance/local_instance.cc",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700298 ],
299 shared_libs: [
Andreas Gampe3fec9ac2016-09-13 10:47:28 -0700300 "libbase",
Andreas Gampee54d9922016-10-11 19:55:37 -0700301 ],
Andreas Gampe5e03a302017-03-13 13:10:00 -0700302 header_libs: ["libopenjdkjvmti_headers"],
Andreas Gampe3f46c962017-03-30 10:26:59 -0700303 include_dirs: ["art/test/ti-agent"],
Andreas Gampee54d9922016-10-11 19:55:37 -0700304}
305
Andreas Gampe027444b2017-03-31 12:49:07 -0700306art_cc_defaults {
307 name: "libtiagent-defaults",
308 defaults: ["libtiagent-base-defaults"],
309 srcs: [
310 // This is to get the IsInterpreted native method.
311 "common/stack_inspect.cc",
312 "common/runtime_state.cc",
Alex Light78d63412017-04-14 16:20:53 -0700313 "ti-agent/common_load.cc",
Andreas Gampe027444b2017-03-31 12:49:07 -0700314 // This includes the remaining test functions. We should try to refactor things to
315 // make this list smaller.
Andreas Gampe027444b2017-03-31 12:49:07 -0700316 "901-hello-ti-agent/basics.cc",
317 "909-attach-agent/attach.cc",
Andreas Gamped5f2ccc2017-04-19 13:37:48 -0700318 "912-classes/classes_art.cc",
Andreas Gampe027444b2017-03-31 12:49:07 -0700319 "936-search-onload/search_onload.cc",
Andreas Gampe027444b2017-03-31 12:49:07 -0700320 "983-source-transform-verify/source_transform.cc",
321 ],
322}
323
Andreas Gampee54d9922016-10-11 19:55:37 -0700324art_cc_test_library {
325 name: "libtiagent",
326 defaults: ["libtiagent-defaults"],
Andreas Gampe6e3dd3e2016-11-17 17:13:53 -0800327 shared_libs: ["libart"],
Colin Crossafd3c9e2016-09-16 13:47:21 -0700328}
329
330art_cc_test_library {
331 name: "libtiagentd",
332 defaults: [
Colin Crossafd3c9e2016-09-16 13:47:21 -0700333 "art_debug_defaults",
Andreas Gampe5115efb2017-05-24 16:55:54 -0700334 "libtiagent-defaults",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700335 ],
Andreas Gampe6e3dd3e2016-11-17 17:13:53 -0800336 shared_libs: ["libartd"],
Colin Crossafd3c9e2016-09-16 13:47:21 -0700337}
338
Alex Light8f2c6d42017-04-10 16:27:35 -0700339art_cc_defaults {
340 name: "libtistress-defaults",
341 defaults: ["libartagent-defaults"],
342 srcs: [
343 "ti-stress/stress.cc",
344 ],
345 shared_libs: [
346 "libbase",
347 ],
348 header_libs: ["libopenjdkjvmti_headers"],
349}
350
351art_cc_test_library {
352 name: "libtistress",
353 defaults: [ "libtistress-defaults"],
354 shared_libs: ["libart"],
355}
356
357art_cc_test_library {
358 name: "libtistressd",
359 defaults: [
Alex Light8f2c6d42017-04-10 16:27:35 -0700360 "art_debug_defaults",
Andreas Gampe5115efb2017-05-24 16:55:54 -0700361 "libtistress-defaults",
Alex Light8f2c6d42017-04-10 16:27:35 -0700362 ],
363 shared_libs: ["libartd"],
364}
365
Andreas Gampe027444b2017-03-31 12:49:07 -0700366art_cc_test_library {
367 name: "libctstiagent",
368 defaults: ["libtiagent-base-defaults"],
369 export_include_dirs: ["ti-agent"],
370}
371
Colin Crossafd3c9e2016-09-16 13:47:21 -0700372cc_defaults {
373 name: "libarttest-defaults",
374 defaults: [
Colin Crossafd3c9e2016-09-16 13:47:21 -0700375 "art_test_defaults",
Andreas Gampe5115efb2017-05-24 16:55:54 -0700376 "art_defaults",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700377 ],
378 srcs: [
379 "common/runtime_state.cc",
380 "common/stack_inspect.cc",
381 "004-JniTest/jni_test.cc",
382 "004-SignalTest/signaltest.cc",
383 "004-ReferenceMap/stack_walk_refmap_jni.cc",
384 "004-StackWalk/stack_walk_jni.cc",
385 "004-ThreadStress/thread_stress.cc",
386 "004-UnsafeTest/unsafe_test.cc",
387 "044-proxy/native_proxy.cc",
388 "051-thread/thread_test.cc",
389 "117-nopatchoat/nopatchoat.cc",
390 "1337-gc-coverage/gc_coverage.cc",
391 "136-daemon-jni-shutdown/daemon_jni_shutdown.cc",
392 "137-cfi/cfi.cc",
393 "139-register-natives/regnative.cc",
394 "141-class-unload/jni_unload.cc",
395 "148-multithread-gc-annotations/gc_coverage.cc",
396 "149-suspend-all-stress/suspend_all.cc",
Mathieu Chartier72a32892017-01-24 09:40:56 -0800397 "154-gc-loop/heap_interface.cc",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700398 "454-get-vreg/get_vreg_jni.cc",
399 "457-regs/regs_jni.cc",
400 "461-get-reference-vreg/get_reference_vreg_jni.cc",
401 "466-get-live-vreg/get_live_vreg_jni.cc",
402 "497-inlining-and-class-loader/clear_dex_cache.cc",
403 "543-env-long-ref/env_long_ref.cc",
404 "566-polymorphic-inlining/polymorphic_inline.cc",
405 "570-checker-osr/osr.cc",
406 "595-profile-saving/profile-saving.cc",
407 "596-app-images/app_images.cc",
Hans Boehm6fe97e02016-05-04 18:35:57 -0700408 "596-monitor-inflation/monitor_inflation.cc",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700409 "597-deopt-new-string/deopt.cc",
Vladimir Markoc5798bf2016-12-09 10:20:54 +0000410 "626-const-class-linking/clear_dex_cache_types.cc",
Nicolas Geoffray13a797b2017-03-15 16:41:31 +0000411 "642-fp-callees/fp_callees.cc",
Vladimir Marko5fdd7782017-04-20 11:26:03 +0100412 "647-jni-get-field-id/get_field_id.cc",
Roland Levillain0d2323e2017-06-26 18:14:39 +0100413 "656-annotation-lookup-generic-jni/test.cc",
Jeff Hao3c3911e2017-08-14 15:14:29 -0700414 "664-aget-verifier/aget-verifier.cc",
Orion Hodsoneced6922017-06-01 10:54:28 +0100415 "708-jit-cache-churn/jit.cc"
Colin Crossafd3c9e2016-09-16 13:47:21 -0700416 ],
417 shared_libs: [
418 "libbacktrace",
Andreas Gampe3fec9ac2016-09-13 10:47:28 -0700419 "libbase",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700420 "libnativehelper",
421 ],
422 target: {
423 android: {
424 shared_libs: ["libdl"],
425 },
426 host: {
427 host_ldlibs: [
428 "-ldl",
429 "-lpthread",
430 ],
431 },
432 },
433}
434
435art_cc_test_library {
436 name: "libarttest",
437 defaults: ["libarttest-defaults"],
438 shared_libs: ["libart"],
439}
440
441art_cc_test_library {
442 name: "libarttestd",
443 defaults: [
Colin Crossafd3c9e2016-09-16 13:47:21 -0700444 "art_debug_defaults",
Andreas Gampe5115efb2017-05-24 16:55:54 -0700445 "libarttest-defaults",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700446 ],
447 shared_libs: ["libartd"],
448}
449
450art_cc_test_library {
451 name: "libnativebridgetest",
452 shared_libs: ["libart"],
453 defaults: [
Colin Crossafd3c9e2016-09-16 13:47:21 -0700454 "art_test_defaults",
Andreas Gampe5115efb2017-05-24 16:55:54 -0700455 "art_debug_defaults",
456 "art_defaults",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700457 ],
Steven Morelandc7affbd2017-07-06 11:26:51 -0700458 header_libs: ["libnativebridge-dummy-headers"],
Colin Crossafd3c9e2016-09-16 13:47:21 -0700459 srcs: ["115-native-bridge/nativebridge.cc"],
460 target: {
461 android: {
462 shared_libs: ["libdl"],
463 },
464 host: {
465 host_ldlibs: [
466 "-ldl",
467 "-lpthread",
468 ],
469 },
470 linux: {
471 host_ldlibs: ["-lrt"],
472 },
473 },
474}