• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1//
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 {
18    name: "art_test_defaults",
19    host_supported: true,
20    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        },
39        darwin: {
40            enabled: false,
41        },
42    },
43    cflags: [
44        "-Wno-frame-larger-than=",
45    ],
46}
47
48art_cc_defaults {
49    name: "art_gtest_defaults",
50    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_test_defaults",
55        "art_debug_defaults",
56        "art_defaults",
57    ],
58
59    shared_libs: [
60        "libartd",
61        "libartd-disassembler",
62        "libvixld-arm",
63        "libvixld-arm64",
64        "libart-gtest",
65        "libdexfiled",
66
67        "libbase",
68        "libicuuc",
69        "libicui18n",
70        "libnativehelper",
71        "libz",
72    ],
73    whole_static_libs: [
74        "libsigchain",
75    ],
76
77    target: {
78        linux: {
79            ldflags: [
80                // Allow jni_compiler_test to find Java_MyClassNatives_bar
81                // within itself using dlopen(NULL, ...).
82                // Mac OS linker doesn't understand --export-dynamic.
83                "-Wl,--export-dynamic",
84                "-Wl,-u,Java_MyClassNatives_bar",
85                "-Wl,-u,Java_MyClassNatives_sbar",
86            ],
87            cflags: [
88                // gtest issue
89                "-Wno-used-but-marked-unused",
90                "-Wno-deprecated",
91                "-Wno-missing-noreturn",
92            ],
93        },
94        host: {
95            shared_libs: [
96                "libziparchive",
97            ],
98        },
99        android: {
100            shared_libs: [
101                "liblog",
102            ],
103        },
104    },
105}
106
107art_cc_defaults {
108    name: "libart-gtest-defaults",
109    host_supported: true,
110    defaults: [
111        "art_debug_defaults",
112        "art_defaults",
113    ],
114    shared_libs: [
115        "libartd",
116        "libartd-compiler",
117        "libdexfiled",
118    ],
119    static_libs: [
120        "libgtest",
121    ],
122    target: {
123        android32: {
124            cflags: ["-DART_TARGET_NATIVETEST_DIR=/data/nativetest/art"],
125        },
126        android64: {
127            cflags: ["-DART_TARGET_NATIVETEST_DIR=/data/nativetest64/art"],
128        },
129        linux: {
130            cflags: [
131                // gtest issue
132                "-Wno-used-but-marked-unused",
133                "-Wno-deprecated",
134                "-Wno-missing-noreturn",
135            ],
136        },
137        darwin: {
138            enabled: false,
139        },
140    },
141}
142
143art_cc_library {
144    name: "libart-gtest",
145    host_supported: true,
146    whole_static_libs: [
147        "libart-compiler-gtest",
148        "libart-runtime-gtest",
149        "libgtest",
150    ],
151    shared_libs: [
152        "libartd",
153        "libartd-compiler",
154        "libdexfiled",
155        "libbase",
156        "libbacktrace",
157    ],
158    target: {
159        darwin: {
160            enabled: false,
161        },
162    },
163}
164
165cc_defaults {
166    name: "libartagent-defaults",
167    defaults: [
168        "art_test_defaults",
169        "art_defaults",
170    ],
171    shared_libs: [
172        "libbacktrace",
173        "libbase",
174        "libnativehelper",
175    ],
176}
177
178art_cc_test_library {
179    name: "libartagent",
180    srcs: ["900-hello-plugin/load_unload.cc"],
181    defaults: ["libartagent-defaults"],
182    shared_libs: [
183        "libart",
184        "libdexfile",
185    ],
186}
187
188art_cc_test_library {
189    name: "libartagentd",
190    srcs: ["900-hello-plugin/load_unload.cc"],
191    defaults: [
192        "art_debug_defaults",
193        "libartagent-defaults",
194    ],
195    shared_libs: [
196        "libartd",
197        "libdexfiled",
198    ],
199}
200
201art_cc_defaults {
202    name: "libtiagent-base-defaults",
203    defaults: [
204        "art_test_defaults",
205        "art_defaults",
206        // Not derived from libartagent-defaults for NDK.
207    ],
208    srcs: [
209        // These are the ART-independent parts.
210        "ti-agent/agent_common.cc",
211        "ti-agent/agent_startup.cc",
212        "ti-agent/jni_binder.cc",
213        "ti-agent/jvmti_helper.cc",
214        "ti-agent/test_env.cc",
215        "ti-agent/breakpoint_helper.cc",
216        "ti-agent/common_helper.cc",
217        "ti-agent/frame_pop_helper.cc",
218        "ti-agent/locals_helper.cc",
219        "ti-agent/monitors_helper.cc",
220        "ti-agent/redefinition_helper.cc",
221        "ti-agent/suspension_helper.cc",
222        "ti-agent/stack_trace_helper.cc",
223        "ti-agent/threads_helper.cc",
224        "ti-agent/trace_helper.cc",
225        "ti-agent/exceptions_helper.cc",
226        // This is the list of non-special OnLoad things and excludes BCI and anything that depends
227        // on ART internals.
228        "903-hello-tagging/tagging.cc",
229        "904-object-allocation/tracking.cc",
230        "905-object-free/tracking_free.cc",
231        "906-iterate-heap/iterate_heap.cc",
232        "907-get-loaded-classes/get_loaded_classes.cc",
233        "908-gc-start-finish/gc_callbacks.cc",
234        "910-methods/methods.cc",
235        "911-get-stack-trace/stack_trace.cc",
236        "912-classes/classes.cc",
237        "913-heaps/heaps.cc",
238        "918-fields/fields.cc",
239        "920-objects/objects.cc",
240        "922-properties/properties.cc",
241        "923-monitors/monitors.cc",
242        "924-threads/threads.cc",
243        "925-threadgroups/threadgroups.cc",
244        "927-timers/timers.cc",
245        "928-jni-table/jni_table.cc",
246        "929-search/search.cc",
247        "931-agent-thread/agent_thread.cc",
248        "933-misc-events/misc_events.cc",
249        "945-obsolete-native/obsolete_native.cc",
250        "983-source-transform-verify/source_transform.cc",
251        "984-obsolete-invoke/obsolete_invoke.cc",
252        "986-native-method-bind/native_bind.cc",
253        "987-agent-bind/agent_bind.cc",
254        "989-method-trace-throw/method_trace.cc",
255        "991-field-trace-2/field_trace.cc",
256        "992-source-data/source_file.cc",
257        "993-breakpoints/breakpoints.cc",
258        "996-breakpoint-obsolete/obsolete_breakpoints.cc",
259        "1900-track-alloc/alloc.cc",
260        "1901-get-bytecodes/bytecodes.cc",
261        "1905-suspend-native/native_suspend.cc",
262        "1908-suspend-native-resume-self/native_suspend_resume.cc",
263        "1909-per-agent-tls/agent_tls.cc",
264        "1914-get-local-instance/local_instance.cc",
265        "1919-vminit-thread-start-timing/vminit.cc",
266        "1920-suspend-native-monitor/native_suspend_monitor.cc",
267        "1921-suspend-native-recursive-monitor/native_suspend_recursive_monitor.cc",
268        "1922-owned-monitors-info/owned_monitors.cc",
269        "1924-frame-pop-toggle/frame_pop_toggle.cc",
270        "1926-missed-frame-pop/frame_pop_missed.cc",
271        "1927-exception-event/exception_event.cc",
272        "1930-monitor-info/monitor.cc",
273        "1932-monitor-events-misc/monitor_misc.cc",
274        "1934-jvmti-signal-thread/signal_threads.cc",
275        "1939-proxy-frames/local_instance.cc",
276        "1941-dispose-stress/dispose_stress.cc",
277        "1942-suspend-raw-monitor-exit/native_suspend_monitor.cc",
278        "1943-suspend-raw-monitor-wait/native_suspend_monitor.cc",
279        "1946-list-descriptors/descriptors.cc",
280        "1950-unprepared-transform/unprepared_transform.cc",
281    ],
282    // Use NDK-compatible headers for ctstiagent.
283    header_libs: [
284        "libopenjdkjvmti_headers",
285    ],
286    include_dirs: ["art/test/ti-agent"],
287}
288
289art_cc_defaults {
290    name: "libtiagent-defaults",
291    defaults: [
292        "libtiagent-base-defaults",
293        "libartagent-defaults",
294    ],
295    srcs: [
296        // This is to get the IsInterpreted native method.
297        "common/stack_inspect.cc",
298        "common/runtime_state.cc",
299        "ti-agent/common_load.cc",
300        // This includes the remaining test functions. We should try to refactor things to
301        // make this list smaller.
302        "901-hello-ti-agent/basics.cc",
303        "909-attach-agent/attach.cc",
304        "912-classes/classes_art.cc",
305        "936-search-onload/search_onload.cc",
306        "983-source-transform-verify/source_transform_art.cc",
307        "1940-ddms-ext/ddm_ext.cc",
308        "1944-sudden-exit/sudden_exit.cc",
309    ],
310}
311
312art_cc_test_library {
313    name: "libtiagent",
314    defaults: ["libtiagent-defaults"],
315    shared_libs: [
316        "libart",
317        "libdexfile",
318    ],
319}
320
321art_cc_test_library {
322    name: "libtiagentd",
323    defaults: [
324        "art_debug_defaults",
325        "libtiagent-defaults",
326    ],
327    shared_libs: [
328        "libartd",
329        "libdexfiled",
330    ],
331}
332
333cc_library_static {
334    name: "libctstiagent",
335    defaults: ["libtiagent-base-defaults"],
336    host_supported: false,
337    srcs: [
338        "983-source-transform-verify/source_transform_slicer.cc",
339    ],
340    whole_static_libs: [
341        "slicer_ndk",
342    ],
343    static_libs: [
344        "libbase_ndk",
345    ],
346    shared_libs: [
347        "libz",  // for slicer (using adler32).
348    ],
349    sdk_version: "current",
350    stl: "c++_static",
351    cpp_std: "c++14",
352    include_dirs: [
353        // This is needed to resolve the base/ header file in libdexfile. Unfortunately there are
354        // many problems with how we export headers that are making doing this the 'right' way
355        // difficult.
356        // TODO: move those headers to art/ rather than under runtime.
357        "art/runtime",
358        // NDK headers aren't available in platform NDK builds.
359        "libnativehelper/include_jni",
360    ],
361    export_include_dirs: ["ti-agent"],
362}
363
364art_cc_defaults {
365    name: "libtistress-defaults",
366    defaults: ["libartagent-defaults"],
367    srcs: [
368        "ti-stress/stress.cc",
369    ],
370    shared_libs: [
371        "libbase",
372        "slicer",
373    ],
374    header_libs: ["libopenjdkjvmti_headers"],
375}
376
377art_cc_test_library {
378    name: "libtistress",
379    defaults: ["libtistress-defaults"],
380    shared_libs: ["libart"],
381}
382
383art_cc_test_library {
384    name: "libtistressd",
385    defaults: [
386        "art_debug_defaults",
387        "libtistress-defaults",
388    ],
389    shared_libs: ["libartd"],
390}
391
392cc_defaults {
393    name: "libarttest-defaults",
394    defaults: [
395        "art_test_defaults",
396        "art_defaults",
397    ],
398    srcs: [
399        "004-JniTest/jni_test.cc",
400        "004-ReferenceMap/stack_walk_refmap_jni.cc",
401        "004-SignalTest/signaltest.cc",
402        "004-StackWalk/stack_walk_jni.cc",
403        "004-ThreadStress/thread_stress.cc",
404        "004-UnsafeTest/unsafe_test.cc",
405        "044-proxy/native_proxy.cc",
406        "051-thread/thread_test.cc",
407        "117-nopatchoat/nopatchoat.cc",
408        "1337-gc-coverage/gc_coverage.cc",
409        "136-daemon-jni-shutdown/daemon_jni_shutdown.cc",
410        "137-cfi/cfi.cc",
411        "139-register-natives/regnative.cc",
412        "141-class-unload/jni_unload.cc",
413        "148-multithread-gc-annotations/gc_coverage.cc",
414        "149-suspend-all-stress/suspend_all.cc",
415        "154-gc-loop/heap_interface.cc",
416        "167-visit-locks/visit_locks.cc",
417        "169-threadgroup-jni/jni_daemon_thread.cc",
418        "1945-proxy-method-arguments/get_args.cc",
419        "203-multi-checkpoint/multi_checkpoint.cc",
420        "305-other-fault-handler/fault_handler.cc",
421        "454-get-vreg/get_vreg_jni.cc",
422        "457-regs/regs_jni.cc",
423        "461-get-reference-vreg/get_reference_vreg_jni.cc",
424        "466-get-live-vreg/get_live_vreg_jni.cc",
425        "497-inlining-and-class-loader/clear_dex_cache.cc",
426        "543-env-long-ref/env_long_ref.cc",
427        "566-polymorphic-inlining/polymorphic_inline.cc",
428        "570-checker-osr/osr.cc",
429        "595-profile-saving/profile-saving.cc",
430        "596-app-images/app_images.cc",
431        "596-monitor-inflation/monitor_inflation.cc",
432        "597-deopt-new-string/deopt.cc",
433        "616-cha-unloading/cha_unload.cc",
434        "626-const-class-linking/clear_dex_cache_types.cc",
435        "642-fp-callees/fp_callees.cc",
436        "647-jni-get-field-id/get_field_id.cc",
437        "656-annotation-lookup-generic-jni/test.cc",
438        "661-oat-writer-layout/oat_writer_layout.cc",
439        "664-aget-verifier/aget-verifier.cc",
440        "667-jit-jni-stub/jit_jni_stub_test.cc",
441        "674-hiddenapi/hiddenapi.cc",
442        "708-jit-cache-churn/jit.cc",
443        "909-attach-agent/disallow_debugging.cc",
444        "1947-breakpoint-redefine-deopt/check_deopt.cc",
445        "common/runtime_state.cc",
446        "common/stack_inspect.cc",
447    ],
448    shared_libs: [
449        "libbacktrace",
450        "libbase",
451        "libnativehelper",
452    ],
453}
454
455art_cc_test_library {
456    name: "libarttest",
457    defaults: ["libarttest-defaults"],
458    shared_libs: [
459        "libart",
460        "libdexfile",
461    ],
462}
463
464art_cc_test_library {
465    name: "libarttestd",
466    defaults: [
467        "art_debug_defaults",
468        "libarttest-defaults",
469    ],
470    shared_libs: [
471        "libartd",
472        "libdexfiled",
473    ],
474}
475
476art_cc_test_library {
477    name: "libnativebridgetest",
478    shared_libs: ["libart"],
479    defaults: [
480        "art_test_defaults",
481        "art_debug_defaults",
482        "art_defaults",
483    ],
484    header_libs: ["libnativebridge-dummy-headers"],
485    srcs: ["115-native-bridge/nativebridge.cc"],
486}
487