| // |
| // Copyright (C) 2016 The Android Open Source Project |
| // |
| // Licensed under the Apache License, Version 2.0 (the "License"); |
| // you may not use this file except in compliance with the License. |
| // You may obtain a copy of the License at |
| // |
| // http://www.apache.org/licenses/LICENSE-2.0 |
| // |
| // Unless required by applicable law or agreed to in writing, software |
| // distributed under the License is distributed on an "AS IS" BASIS, |
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| // See the License for the specific language governing permissions and |
| // limitations under the License. |
| // |
| |
| art_cc_defaults { |
| name: "art_test_defaults", |
| host_supported: true, |
| target: { |
| android_arm: { |
| relative_install_path: "art/arm", |
| }, |
| android_arm64: { |
| relative_install_path: "art/arm64", |
| }, |
| android_mips: { |
| relative_install_path: "art/mips", |
| }, |
| android_mips64: { |
| relative_install_path: "art/mips64", |
| }, |
| android_x86: { |
| relative_install_path: "art/x86", |
| }, |
| android_x86_64: { |
| relative_install_path: "art/x86_64", |
| }, |
| darwin: { |
| enabled: false, |
| }, |
| }, |
| cflags: [ |
| "-Wno-frame-larger-than=", |
| ], |
| } |
| |
| art_cc_defaults { |
| name: "art_gtest_defaults", |
| test_per_src: true, |
| // These really are gtests, but the gtest library comes from libart-gtest.so |
| gtest: false, |
| defaults: [ |
| "art_test_defaults", |
| "art_debug_defaults", |
| "art_defaults", |
| ], |
| |
| shared_libs: [ |
| "libartd", |
| "libartd-disassembler", |
| "libvixld-arm", |
| "libvixld-arm64", |
| "libart-gtest", |
| |
| "libbase", |
| "libicuuc", |
| "libicui18n", |
| "libnativehelper", |
| ], |
| whole_static_libs: [ |
| "libsigchain", |
| ], |
| |
| target: { |
| linux: { |
| ldflags: [ |
| // Allow jni_compiler_test to find Java_MyClassNatives_bar |
| // within itself using dlopen(NULL, ...). |
| // Mac OS linker doesn't understand --export-dynamic. |
| "-Wl,--export-dynamic", |
| "-Wl,-u,Java_MyClassNatives_bar", |
| "-Wl,-u,Java_MyClassNatives_sbar", |
| ], |
| shared_libs: [ |
| "libziparchive", |
| "libz-host", |
| ], |
| host_ldlibs: [ |
| "-ldl", |
| "-lpthread", |
| ], |
| cflags: [ |
| // gtest issue |
| "-Wno-used-but-marked-unused", |
| "-Wno-deprecated", |
| "-Wno-missing-noreturn", |
| ], |
| }, |
| android: { |
| ldflags: [ |
| // Allow jni_compiler_test to find Java_MyClassNatives_bar |
| // within itself using dlopen(NULL, ...). |
| "-Wl,--export-dynamic", |
| "-Wl,-u,Java_MyClassNatives_bar", |
| "-Wl,-u,Java_MyClassNatives_sbar", |
| ], |
| shared_libs: [ |
| "liblog", |
| "libdl", |
| "libz", |
| ], |
| cflags: [ |
| // gtest issue |
| "-Wno-used-but-marked-unused", |
| "-Wno-deprecated", |
| "-Wno-missing-noreturn", |
| ], |
| }, |
| }, |
| } |
| |
| art_cc_defaults { |
| name: "libart-gtest-defaults", |
| host_supported: true, |
| defaults: [ |
| "art_debug_defaults", |
| "art_defaults", |
| ], |
| shared_libs: [ |
| "libartd", |
| "libartd-compiler", |
| ], |
| static_libs: [ |
| "libgtest", |
| ], |
| target: { |
| android32: { |
| cflags: ["-DART_TARGET_NATIVETEST_DIR=/data/nativetest/art"], |
| }, |
| android64: { |
| cflags: ["-DART_TARGET_NATIVETEST_DIR=/data/nativetest64/art"], |
| }, |
| android: { |
| cflags: [ |
| // gtest issue |
| "-Wno-used-but-marked-unused", |
| "-Wno-deprecated", |
| "-Wno-missing-noreturn", |
| ], |
| }, |
| linux: { |
| cflags: [ |
| // gtest issue |
| "-Wno-used-but-marked-unused", |
| "-Wno-deprecated", |
| "-Wno-missing-noreturn", |
| ], |
| }, |
| darwin: { |
| enabled: false, |
| }, |
| }, |
| } |
| |
| art_cc_library { |
| name: "libart-gtest", |
| host_supported: true, |
| whole_static_libs: [ |
| "libart-compiler-gtest", |
| "libart-runtime-gtest", |
| "libgtest" |
| ], |
| shared_libs: [ |
| "libartd", |
| "libartd-compiler", |
| "libbase", |
| "libbacktrace" |
| ], |
| target: { |
| android: { |
| shared_libs: [ |
| "libdl", |
| ], |
| }, |
| host: { |
| host_ldlibs: [ |
| "-ldl", |
| "-lpthread", |
| ], |
| }, |
| darwin: { |
| enabled: false, |
| }, |
| }, |
| } |
| |
| cc_defaults { |
| name: "libartagent-defaults", |
| defaults: [ |
| "art_test_defaults", |
| "art_defaults", |
| ], |
| shared_libs: [ |
| "libbacktrace", |
| "libbase", |
| "libnativehelper", |
| ], |
| target: { |
| android: { |
| shared_libs: ["libdl"], |
| }, |
| host: { |
| host_ldlibs: [ |
| "-ldl", |
| "-lpthread", |
| ], |
| }, |
| }, |
| } |
| |
| art_cc_test_library { |
| name: "libartagent", |
| srcs: ["900-hello-plugin/load_unload.cc"], |
| defaults: ["libartagent-defaults"], |
| shared_libs: ["libart"], |
| } |
| |
| art_cc_test_library { |
| name: "libartagentd", |
| srcs: ["900-hello-plugin/load_unload.cc"], |
| defaults: [ |
| "art_debug_defaults", |
| "libartagent-defaults", |
| ], |
| shared_libs: ["libartd"], |
| } |
| |
| art_cc_defaults { |
| name: "libtiagent-base-defaults", |
| defaults: ["libartagent-defaults"], |
| srcs: [ |
| // These are the ART-independent parts. |
| "ti-agent/agent_common.cc", |
| "ti-agent/agent_startup.cc", |
| "ti-agent/jni_binder.cc", |
| "ti-agent/jvmti_helper.cc", |
| "ti-agent/test_env.cc", |
| "ti-agent/breakpoint_helper.cc", |
| "ti-agent/common_helper.cc", |
| "ti-agent/frame_pop_helper.cc", |
| "ti-agent/locals_helper.cc", |
| "ti-agent/redefinition_helper.cc", |
| "ti-agent/suspension_helper.cc", |
| "ti-agent/stack_trace_helper.cc", |
| "ti-agent/trace_helper.cc", |
| // This is the list of non-special OnLoad things and excludes BCI and anything that depends |
| // on ART internals. |
| "903-hello-tagging/tagging.cc", |
| "904-object-allocation/tracking.cc", |
| "905-object-free/tracking_free.cc", |
| "906-iterate-heap/iterate_heap.cc", |
| "907-get-loaded-classes/get_loaded_classes.cc", |
| "908-gc-start-finish/gc_callbacks.cc", |
| "910-methods/methods.cc", |
| "911-get-stack-trace/stack_trace.cc", |
| "912-classes/classes.cc", |
| "913-heaps/heaps.cc", |
| "918-fields/fields.cc", |
| "920-objects/objects.cc", |
| "922-properties/properties.cc", |
| "923-monitors/monitors.cc", |
| "924-threads/threads.cc", |
| "925-threadgroups/threadgroups.cc", |
| "927-timers/timers.cc", |
| "928-jni-table/jni_table.cc", |
| "929-search/search.cc", |
| "931-agent-thread/agent_thread.cc", |
| "933-misc-events/misc_events.cc", |
| "945-obsolete-native/obsolete_native.cc", |
| "984-obsolete-invoke/obsolete_invoke.cc", |
| "986-native-method-bind/native_bind.cc", |
| "987-agent-bind/agent_bind.cc", |
| "989-method-trace-throw/method_trace.cc", |
| "991-field-trace-2/field_trace.cc", |
| "992-source-data/source_file.cc", |
| "993-breakpoints/breakpoints.cc", |
| "996-breakpoint-obsolete/obsolete_breakpoints.cc", |
| "1900-track-alloc/alloc.cc", |
| "1901-get-bytecodes/bytecodes.cc", |
| "1905-suspend-native/native_suspend.cc", |
| "1908-suspend-native-resume-self/native_suspend_resume.cc", |
| "1909-per-agent-tls/agent_tls.cc", |
| "1914-get-local-instance/local_instance.cc", |
| "1919-vminit-thread-start-timing/vminit.cc", |
| "1920-suspend-native-monitor/native_suspend_monitor.cc", |
| "1921-suspend-native-recursive-monitor/native_suspend_recursive_monitor.cc", |
| "1922-owned-monitors-info/owned_monitors.cc", |
| "1924-frame-pop-toggle/frame_pop_toggle.cc", |
| "1926-missed-frame-pop/frame_pop_missed.cc", |
| ], |
| shared_libs: [ |
| "libbase", |
| ], |
| header_libs: ["libopenjdkjvmti_headers"], |
| include_dirs: ["art/test/ti-agent"], |
| } |
| |
| art_cc_defaults { |
| name: "libtiagent-defaults", |
| defaults: ["libtiagent-base-defaults"], |
| srcs: [ |
| // This is to get the IsInterpreted native method. |
| "common/stack_inspect.cc", |
| "common/runtime_state.cc", |
| "ti-agent/common_load.cc", |
| // This includes the remaining test functions. We should try to refactor things to |
| // make this list smaller. |
| "901-hello-ti-agent/basics.cc", |
| "909-attach-agent/attach.cc", |
| "912-classes/classes_art.cc", |
| "936-search-onload/search_onload.cc", |
| "983-source-transform-verify/source_transform.cc", |
| ], |
| } |
| |
| art_cc_test_library { |
| name: "libtiagent", |
| defaults: ["libtiagent-defaults"], |
| shared_libs: ["libart"], |
| } |
| |
| art_cc_test_library { |
| name: "libtiagentd", |
| defaults: [ |
| "art_debug_defaults", |
| "libtiagent-defaults", |
| ], |
| shared_libs: ["libartd"], |
| } |
| |
| art_cc_defaults { |
| name: "libtistress-defaults", |
| defaults: ["libartagent-defaults"], |
| srcs: [ |
| "ti-stress/stress.cc", |
| ], |
| shared_libs: [ |
| "libbase", |
| ], |
| header_libs: ["libopenjdkjvmti_headers"], |
| } |
| |
| art_cc_test_library { |
| name: "libtistress", |
| defaults: [ "libtistress-defaults"], |
| shared_libs: ["libart"], |
| } |
| |
| art_cc_test_library { |
| name: "libtistressd", |
| defaults: [ |
| "art_debug_defaults", |
| "libtistress-defaults", |
| ], |
| shared_libs: ["libartd"], |
| } |
| |
| art_cc_test_library { |
| name: "libctstiagent", |
| defaults: ["libtiagent-base-defaults"], |
| export_include_dirs: ["ti-agent"], |
| } |
| |
| cc_defaults { |
| name: "libarttest-defaults", |
| defaults: [ |
| "art_test_defaults", |
| "art_defaults", |
| ], |
| srcs: [ |
| "common/runtime_state.cc", |
| "common/stack_inspect.cc", |
| "004-JniTest/jni_test.cc", |
| "004-SignalTest/signaltest.cc", |
| "004-ReferenceMap/stack_walk_refmap_jni.cc", |
| "004-StackWalk/stack_walk_jni.cc", |
| "004-ThreadStress/thread_stress.cc", |
| "004-UnsafeTest/unsafe_test.cc", |
| "044-proxy/native_proxy.cc", |
| "051-thread/thread_test.cc", |
| "117-nopatchoat/nopatchoat.cc", |
| "1337-gc-coverage/gc_coverage.cc", |
| "136-daemon-jni-shutdown/daemon_jni_shutdown.cc", |
| "137-cfi/cfi.cc", |
| "139-register-natives/regnative.cc", |
| "141-class-unload/jni_unload.cc", |
| "148-multithread-gc-annotations/gc_coverage.cc", |
| "149-suspend-all-stress/suspend_all.cc", |
| "154-gc-loop/heap_interface.cc", |
| "454-get-vreg/get_vreg_jni.cc", |
| "457-regs/regs_jni.cc", |
| "461-get-reference-vreg/get_reference_vreg_jni.cc", |
| "466-get-live-vreg/get_live_vreg_jni.cc", |
| "497-inlining-and-class-loader/clear_dex_cache.cc", |
| "543-env-long-ref/env_long_ref.cc", |
| "566-polymorphic-inlining/polymorphic_inline.cc", |
| "570-checker-osr/osr.cc", |
| "595-profile-saving/profile-saving.cc", |
| "596-app-images/app_images.cc", |
| "596-monitor-inflation/monitor_inflation.cc", |
| "597-deopt-new-string/deopt.cc", |
| "626-const-class-linking/clear_dex_cache_types.cc", |
| "642-fp-callees/fp_callees.cc", |
| "647-jni-get-field-id/get_field_id.cc", |
| "656-annotation-lookup-generic-jni/test.cc", |
| "664-aget-verifier/aget-verifier.cc", |
| "708-jit-cache-churn/jit.cc" |
| ], |
| shared_libs: [ |
| "libbacktrace", |
| "libbase", |
| "libnativehelper", |
| ], |
| target: { |
| android: { |
| shared_libs: ["libdl"], |
| }, |
| host: { |
| host_ldlibs: [ |
| "-ldl", |
| "-lpthread", |
| ], |
| }, |
| }, |
| } |
| |
| art_cc_test_library { |
| name: "libarttest", |
| defaults: ["libarttest-defaults"], |
| shared_libs: ["libart"], |
| } |
| |
| art_cc_test_library { |
| name: "libarttestd", |
| defaults: [ |
| "art_debug_defaults", |
| "libarttest-defaults", |
| ], |
| shared_libs: ["libartd"], |
| } |
| |
| art_cc_test_library { |
| name: "libnativebridgetest", |
| shared_libs: ["libart"], |
| defaults: [ |
| "art_test_defaults", |
| "art_debug_defaults", |
| "art_defaults", |
| ], |
| header_libs: ["libnativebridge-dummy-headers"], |
| srcs: ["115-native-bridge/nativebridge.cc"], |
| target: { |
| android: { |
| shared_libs: ["libdl"], |
| }, |
| host: { |
| host_ldlibs: [ |
| "-ldl", |
| "-lpthread", |
| ], |
| }, |
| linux: { |
| host_ldlibs: ["-lrt"], |
| }, |
| }, |
| } |