1//
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
17// Keep the __jit_debug_register_code symbol as a unique symbol during ICF for architectures where
18// we use gold as the linker (arm, x86, x86_64). The symbol is used by the debuggers to detect when
19// new jit code is generated. We don't want it to be called when a different function with the same
20// (empty) body is called.
21JIT_DEBUG_REGISTER_CODE_LDFLAGS = [
22    "-Wl,--keep-unique,__jit_debug_register_code",
23    "-Wl,--keep-unique,__dex_debug_register_code",
24]
25
26// These are defaults for native shared libaries that are expected to be
27// in stack traces often.
28libart_cc_defaults {
29    name: "libart_nativeunwind_defaults",
30    arch: {
31        arm: {
32            // Arm 32 bit does not produce complete exidx unwind information
33            // so keep the .debug_frame which is relatively small and does
34            // include needed unwind information.
35            // See b/132992102 and b/145790995 for details.
36            strip: {
37                keep_symbols_and_debug_frame: true,
38            },
39        },
40        // For all other architectures, leave the symbols in the shared library
41        // so that stack unwinders can produce meaningful name resolution.
42        arm64: {
43            strip: {
44                keep_symbols: true,
45            },
46        },
47        x86: {
48            strip: {
49                keep_symbols: true,
50            },
51        },
52        x86_64: {
53            strip: {
54                keep_symbols: true,
55            },
56        },
57    },
58}
59
60libart_cc_defaults {
61    name: "libart_defaults",
62    defaults: ["art_defaults"],
63    host_supported: true,
64    srcs: [
65        "aot_class_linker.cc",
66        "art_field.cc",
67        "art_method.cc",
68        "backtrace_helper.cc",
69        "barrier.cc",
70        "base/locks.cc",
71        "base/mem_map_arena_pool.cc",
72        "base/mutex.cc",
73        "base/quasi_atomic.cc",
74        "base/timing_logger.cc",
75        "cha.cc",
76        "class_linker.cc",
77        "class_loader_context.cc",
78        "class_root.cc",
79        "class_table.cc",
80        "common_throws.cc",
81        "compiler_filter.cc",
82        "debug_print.cc",
83        "debugger.cc",
84        "dex/dex_file_annotations.cc",
85        "dex_register_location.cc",
86        "dex_to_dex_decompiler.cc",
87        "elf_file.cc",
88        "exec_utils.cc",
89        "fault_handler.cc",
90        "gc/allocation_record.cc",
91        "gc/allocator/dlmalloc.cc",
92        "gc/allocator/rosalloc.cc",
93        "gc/accounting/bitmap.cc",
94        "gc/accounting/card_table.cc",
95        "gc/accounting/heap_bitmap.cc",
96        "gc/accounting/mod_union_table.cc",
97        "gc/accounting/remembered_set.cc",
98        "gc/accounting/space_bitmap.cc",
99        "gc/collector/concurrent_copying.cc",
100        "gc/collector/garbage_collector.cc",
101        "gc/collector/immune_region.cc",
102        "gc/collector/immune_spaces.cc",
103        "gc/collector/mark_sweep.cc",
104        "gc/collector/partial_mark_sweep.cc",
105        "gc/collector/semi_space.cc",
106        "gc/collector/sticky_mark_sweep.cc",
107        "gc/gc_cause.cc",
108        "gc/heap.cc",
109        "gc/reference_processor.cc",
110        "gc/reference_queue.cc",
111        "gc/scoped_gc_critical_section.cc",
112        "gc/space/bump_pointer_space.cc",
113        "gc/space/dlmalloc_space.cc",
114        "gc/space/image_space.cc",
115        "gc/space/large_object_space.cc",
116        "gc/space/malloc_space.cc",
117        "gc/space/region_space.cc",
118        "gc/space/rosalloc_space.cc",
119        "gc/space/space.cc",
120        "gc/space/zygote_space.cc",
121        "gc/task_processor.cc",
122        "gc/verification.cc",
123        "hidden_api.cc",
124        "hprof/hprof.cc",
125        "image.cc",
126        "index_bss_mapping.cc",
127        "indirect_reference_table.cc",
128        "instrumentation.cc",
129        "intern_table.cc",
130        "interpreter/interpreter.cc",
131        "interpreter/interpreter_cache.cc",
132        "interpreter/interpreter_common.cc",
133        "interpreter/interpreter_intrinsics.cc",
134        "interpreter/interpreter_switch_impl0.cc",
135        "interpreter/interpreter_switch_impl1.cc",
136        "interpreter/interpreter_switch_impl2.cc",
137        "interpreter/interpreter_switch_impl3.cc",
138        "interpreter/lock_count_data.cc",
139        "interpreter/shadow_frame.cc",
140        "interpreter/unstarted_runtime.cc",
141        "java_frame_root_info.cc",
142        "jit/debugger_interface.cc",
143        "jit/jit.cc",
144        "jit/jit_code_cache.cc",
145        "jit/jit_memory_region.cc",
146        "jit/profiling_info.cc",
147        "jit/profile_saver.cc",
148        "jni/check_jni.cc",
149        "jni/java_vm_ext.cc",
150        "jni/jni_env_ext.cc",
151        "jni/jni_id_manager.cc",
152        "jni/jni_internal.cc",
153        "linear_alloc.cc",
154        "managed_stack.cc",
155        "method_handles.cc",
156        "mirror/array.cc",
157        "mirror/class.cc",
158        "mirror/class_ext.cc",
159        "mirror/dex_cache.cc",
160        "mirror/emulated_stack_frame.cc",
161        "mirror/executable.cc",
162        "mirror/field.cc",
163        "mirror/method.cc",
164        "mirror/method_handle_impl.cc",
165        "mirror/method_handles_lookup.cc",
166        "mirror/method_type.cc",
167        "mirror/object.cc",
168        "mirror/stack_trace_element.cc",
169        "mirror/string.cc",
170        "mirror/throwable.cc",
171        "mirror/var_handle.cc",
172        "monitor.cc",
173        "monitor_objects_stack_visitor.cc",
174        "native_bridge_art_interface.cc",
175        "native_stack_dump.cc",
176        "native/dalvik_system_DexFile.cc",
177        "native/dalvik_system_BaseDexClassLoader.cc",
178        "native/dalvik_system_VMDebug.cc",
179        "native/dalvik_system_VMRuntime.cc",
180        "native/dalvik_system_VMStack.cc",
181        "native/dalvik_system_ZygoteHooks.cc",
182        "native/java_lang_Class.cc",
183        "native/java_lang_Object.cc",
184        "native/java_lang_String.cc",
185        "native/java_lang_StringFactory.cc",
186        "native/java_lang_System.cc",
187        "native/java_lang_Thread.cc",
188        "native/java_lang_Throwable.cc",
189        "native/java_lang_VMClassLoader.cc",
190        "native/java_lang_invoke_MethodHandleImpl.cc",
191        "native/java_lang_ref_FinalizerReference.cc",
192        "native/java_lang_ref_Reference.cc",
193        "native/java_lang_reflect_Array.cc",
194        "native/java_lang_reflect_Constructor.cc",
195        "native/java_lang_reflect_Executable.cc",
196        "native/java_lang_reflect_Field.cc",
197        "native/java_lang_reflect_Method.cc",
198        "native/java_lang_reflect_Parameter.cc",
199        "native/java_lang_reflect_Proxy.cc",
200        "native/java_util_concurrent_atomic_AtomicLong.cc",
201        "native/libcore_util_CharsetUtils.cc",
202        "native/org_apache_harmony_dalvik_ddmc_DdmServer.cc",
203        "native/org_apache_harmony_dalvik_ddmc_DdmVmInternal.cc",
204        "native/sun_misc_Unsafe.cc",
205        "non_debuggable_classes.cc",
206        "nterp_helpers.cc",
207        "oat.cc",
208        "oat_file.cc",
209        "oat_file_assistant.cc",
210        "oat_file_manager.cc",
211        "oat_quick_method_header.cc",
212        "object_lock.cc",
213        "offsets.cc",
214        "parsed_options.cc",
215        "plugin.cc",
216        "quick_exception_handler.cc",
217        "read_barrier.cc",
218        "reference_table.cc",
219        "reflection.cc",
220        "reflective_handle_scope.cc",
221        "reflective_value_visitor.cc",
222        "runtime.cc",
223        "runtime_callbacks.cc",
224        "runtime_common.cc",
225        "runtime_intrinsics.cc",
226        "runtime_options.cc",
227        "scoped_thread_state_change.cc",
228        "signal_catcher.cc",
229        "stack.cc",
230        "stack_map.cc",
231        "string_builder_append.cc",
232        "thread.cc",
233        "thread_list.cc",
234        "thread_pool.cc",
235        "ti/agent.cc",
236        "trace.cc",
237        "transaction.cc",
238        "var_handles.cc",
239        "vdex_file.cc",
240        "verifier/class_verifier.cc",
241        "verifier/instruction_flags.cc",
242        "verifier/method_verifier.cc",
243        "verifier/reg_type.cc",
244        "verifier/reg_type_cache.cc",
245        "verifier/register_line.cc",
246        "verifier/verifier_deps.cc",
247        "verify_object.cc",
248        "well_known_classes.cc",
249
250        "arch/context.cc",
251        "arch/instruction_set_features.cc",
252        "arch/memcmp16.cc",
253        "arch/arm/instruction_set_features_arm.cc",
254        "arch/arm/registers_arm.cc",
255        "arch/arm64/instruction_set_features_arm64.cc",
256        "arch/arm64/registers_arm64.cc",
257        "arch/x86/instruction_set_features_x86.cc",
258        "arch/x86/registers_x86.cc",
259        "arch/x86_64/registers_x86_64.cc",
260        "entrypoints/entrypoint_utils.cc",
261        "entrypoints/jni/jni_entrypoints.cc",
262        "entrypoints/math_entrypoints.cc",
263        "entrypoints/quick/quick_alloc_entrypoints.cc",
264        "entrypoints/quick/quick_cast_entrypoints.cc",
265        "entrypoints/quick/quick_deoptimization_entrypoints.cc",
266        "entrypoints/quick/quick_dexcache_entrypoints.cc",
267        "entrypoints/quick/quick_entrypoints_enum.cc",
268        "entrypoints/quick/quick_field_entrypoints.cc",
269        "entrypoints/quick/quick_fillarray_entrypoints.cc",
270        "entrypoints/quick/quick_jni_entrypoints.cc",
271        "entrypoints/quick/quick_lock_entrypoints.cc",
272        "entrypoints/quick/quick_math_entrypoints.cc",
273        "entrypoints/quick/quick_string_builder_append_entrypoints.cc",
274        "entrypoints/quick/quick_thread_entrypoints.cc",
275        "entrypoints/quick/quick_throw_entrypoints.cc",
276        "entrypoints/quick/quick_trampoline_entrypoints.cc",
277    ],
278
279    arch: {
280        arm: {
281            srcs: [
282                "interpreter/mterp/mterp.cc",
283                "interpreter/mterp/nterp_stub.cc",
284                ":libart_mterp.arm",
285                "arch/arm/context_arm.cc",
286                "arch/arm/entrypoints_init_arm.cc",
287                "arch/arm/instruction_set_features_assembly_tests.S",
288                "arch/arm/jni_entrypoints_arm.S",
289                "arch/arm/memcmp16_arm.S",
290                "arch/arm/quick_entrypoints_arm.S",
291                "arch/arm/quick_entrypoints_cc_arm.cc",
292                "arch/arm/thread_arm.cc",
293                "arch/arm/fault_handler_arm.cc",
294            ],
295        },
296        arm64: {
297            srcs: [
298                "interpreter/mterp/mterp.cc",
299                "interpreter/mterp/nterp_stub.cc",
300                ":libart_mterp.arm64",
301                "arch/arm64/context_arm64.cc",
302                "arch/arm64/entrypoints_init_arm64.cc",
303                "arch/arm64/jni_entrypoints_arm64.S",
304                "arch/arm64/memcmp16_arm64.S",
305                "arch/arm64/quick_entrypoints_arm64.S",
306                "arch/arm64/thread_arm64.cc",
307                "monitor_pool.cc",
308                "arch/arm64/fault_handler_arm64.cc",
309            ],
310        },
311        x86: {
312            srcs: [
313                "interpreter/mterp/mterp.cc",
314                "interpreter/mterp/nterp_stub.cc",
315                ":libart_mterp.x86",
316                "arch/x86/context_x86.cc",
317                "arch/x86/entrypoints_init_x86.cc",
318                "arch/x86/jni_entrypoints_x86.S",
319                "arch/x86/memcmp16_x86.S",
320                "arch/x86/quick_entrypoints_x86.S",
321                "arch/x86/thread_x86.cc",
322                "arch/x86/fault_handler_x86.cc",
323            ],
324            avx: {
325                asflags: ["-DMTERP_USE_AVX"],
326            },
327            avx2: {
328                asflags: ["-DMTERP_USE_AVX"],
329            },
330        },
331        x86_64: {
332            srcs: [
333                // Note that the fault_handler_x86.cc is not a mistake.  This file is
334                // shared between the x86 and x86_64 architectures.
335                "interpreter/mterp/mterp.cc",
336                "interpreter/mterp/nterp.cc",
337                ":libart_mterp.x86_64",
338                ":libart_mterp.x86_64ng",
339                "arch/x86_64/context_x86_64.cc",
340                "arch/x86_64/entrypoints_init_x86_64.cc",
341                "arch/x86_64/jni_entrypoints_x86_64.S",
342                "arch/x86_64/memcmp16_x86_64.S",
343                "arch/x86_64/quick_entrypoints_x86_64.S",
344                "arch/x86_64/thread_x86_64.cc",
345                "monitor_pool.cc",
346                "arch/x86/fault_handler_x86.cc",
347            ],
348            avx: {
349                asflags: ["-DMTERP_USE_AVX"],
350            },
351            avx2: {
352                asflags: ["-DMTERP_USE_AVX"],
353            },
354        },
355    },
356    target: {
357        android: {
358            srcs: [
359                "monitor_android.cc",
360                "runtime_android.cc",
361                "thread_android.cc",
362            ],
363            shared_libs: [
364                "libdl_android",
365            ],
366            static_libs: [
367                "libz", // For adler32.
368            ],
369            cflags: [
370                // ART is allowed to link to libicuuc directly
371                // since they are in the same module
372                "-DANDROID_LINK_SHARED_ICU4C",
373            ],
374        },
375        android_arm: {
376            ldflags: JIT_DEBUG_REGISTER_CODE_LDFLAGS,
377        },
378        android_arm64: {
379            ldflags: JIT_DEBUG_REGISTER_CODE_LDFLAGS,
380        },
381        android_x86: {
382            ldflags: JIT_DEBUG_REGISTER_CODE_LDFLAGS,
383        },
384        android_x86_64: {
385            ldflags: JIT_DEBUG_REGISTER_CODE_LDFLAGS,
386        },
387        host: {
388            srcs: [
389                "monitor_linux.cc",
390                "runtime_linux.cc",
391                "thread_linux.cc",
392            ],
393            shared_libs: [
394                "libz", // For adler32.
395            ],
396        },
397    },
398    cflags: ["-DBUILDING_LIBART=1"],
399    generated_sources: ["art_operator_srcs"],
400    // asm_support_gen.h (used by asm_support.h) is generated with cpp-define-generator
401    generated_headers: ["cpp-define-generator-asm-support"],
402    // export our headers so the libart-gtest targets can use it as well.
403    export_generated_headers: ["cpp-define-generator-asm-support"],
404    header_libs: [
405        "art_cmdlineparser_headers",
406        "cpp-define-generator-definitions",
407        "libicuuc_headers",
408        "libnativehelper_header_only",
409        "jni_platform_headers",
410    ],
411    shared_libs: [
412        "libartpalette",
413        "libnativebridge",
414        "libnativeloader",
415        "libbacktrace",
416        "liblog",
417        // For common macros.
418        "libbase",
419        "libunwindstack",
420        "libsigchain",
421    ],
422    export_include_dirs: ["."],
423    // ART's macros.h depends on libbase's macros.h.
424    // Note: runtime_options.h depends on cmdline. But we don't really want to export this
425    //       generically. dex2oat takes care of it itself.
426    export_shared_lib_headers: ["libbase"],
427}
428
429libart_static_cc_defaults {
430    name: "libart_static_base_defaults",
431    static_libs: [
432        "libartpalette",
433        "libbacktrace",
434        "libbase",
435        "liblog",
436        "libnativebridge",
437        "libnativeloader",
438        "libsigchain_dummy",
439        "libunwindstack",
440        "libz",
441    ],
442}
443
444cc_defaults {
445    name: "libart_static_defaults",
446    defaults: [
447        "libart_static_base_defaults",
448        "libartbase_static_defaults",
449        "libdexfile_static_defaults",
450        "libprofile_static_defaults",
451    ],
452    static_libs: [
453        "libart",
454        "libdexfile_support_static",
455        "libelffile",
456    ],
457}
458
459cc_defaults {
460    name: "libartd_static_defaults",
461    defaults: [
462        "libart_static_base_defaults",
463        "libartbased_static_defaults",
464        "libdexfiled_static_defaults",
465        "libprofiled_static_defaults",
466    ],
467    static_libs: [
468        "libartd",
469        "libdexfiled_support_static",
470        "libelffiled",
471    ],
472}
473
474gensrcs {
475    name: "art_operator_srcs",
476    cmd: "$(location generate_operator_out) art/runtime $(in) > $(out)",
477    tools: ["generate_operator_out"],
478    srcs: [
479        "base/callee_save_type.h",
480        "base/locks.h",
481        "class_loader_context.h",
482        "class_status.h",
483        "debugger.h",
484        "gc_root.h",
485        "gc/allocator_type.h",
486        "gc/allocator/rosalloc.h",
487        "gc/collector_type.h",
488        "gc/collector/gc_type.h",
489        "gc/heap.h",
490        "gc/space/region_space.h",
491        "gc/space/space.h",
492        "gc/weak_root_state.h",
493        "image.h",
494        "instrumentation.h",
495        "indirect_reference_table.h",
496        "jdwp_provider.h",
497        "jni_id_type.h",
498        "lock_word.h",
499        "oat_file.h",
500        "object_callbacks.h",
501        "process_state.h",
502        "reflective_value_visitor.h",
503        "stack.h",
504        "suspend_reason.h",
505        "thread.h",
506        "thread_state.h",
507        "ti/agent.h",
508        "trace.h",
509        "verifier/verifier_enums.h",
510    ],
511    output_extension: "operator_out.cc",
512}
513
514// We always build dex2oat and dependencies, even if the host build is otherwise disabled, since
515// they are used to cross compile for the target.
516
517art_cc_library {
518    name: "libart",
519    defaults: [
520        "libart_defaults",
521        "libart_nativeunwind_defaults",
522    ],
523    whole_static_libs: [
524    ],
525    static_libs: [
526        "libelffile",
527    ],
528    shared_libs: [
529        "libartbase",
530        "libdexfile",
531        // We need to eagerly load it so libdexfile_support used from libunwindstack can find it.
532        "libdexfile_external",
533        "libprofile",
534    ],
535    export_shared_lib_headers: [
536        "libdexfile",
537    ],
538    target: {
539        android: {
540            lto: {
541                thin: true,
542            },
543        },
544    },
545    apex_available: [
546        "com.android.art.release",
547        "com.android.art.debug",
548    ],
549}
550
551art_cc_library {
552    name: "libartd",
553    defaults: [
554        "art_debug_defaults",
555        "libart_defaults",
556    ],
557    whole_static_libs: [
558    ],
559    static_libs: [
560        "libelffiled",
561    ],
562    shared_libs: [
563        "libartbased",
564        "libdexfiled",
565        // We need to eagerly preload it, so that libunwindstack can find it.
566        // Otherwise, it would try to load the non-debug version with dlopen.
567        "libdexfiled_external",
568        "libprofiled",
569    ],
570    export_shared_lib_headers: [
571        "libdexfiled",
572    ],
573    apex_available: [
574        "com.android.art.debug",
575    ],
576}
577
578art_cc_library {
579    name: "libart-runtime-gtest",
580    defaults: ["libart-gtest-defaults"],
581    srcs: [
582        "common_runtime_test.cc",
583        "dexopt_test.cc",
584    ],
585    shared_libs: [
586        "libartd",
587        "libartbase-art-gtest",
588        "libbase",
589        "libbacktrace",
590    ],
591    header_libs: [
592        "libnativehelper_header_only",
593    ],
594}
595
596art_cc_test {
597    name: "art_runtime_tests",
598    defaults: [
599        "art_gtest_defaults",
600    ],
601    srcs: [
602        "arch/arch_test.cc",
603        "arch/instruction_set_features_test.cc",
604        "arch/memcmp16_test.cc",
605        "arch/stub_test.cc",
606        "arch/arm/instruction_set_features_arm_test.cc",
607        "arch/arm64/instruction_set_features_arm64_test.cc",
608        "arch/x86/instruction_set_features_x86_test.cc",
609        "arch/x86_64/instruction_set_features_x86_64_test.cc",
610        "barrier_test.cc",
611        "base/mutex_test.cc",
612        "base/timing_logger_test.cc",
613        "cha_test.cc",
614        "class_linker_test.cc",
615        "class_loader_context_test.cc",
616        "class_table_test.cc",
617        "compiler_filter_test.cc",
618        "entrypoints/math_entrypoints_test.cc",
619        "entrypoints/quick/quick_trampoline_entrypoints_test.cc",
620        "entrypoints_order_test.cc",
621        "exec_utils_test.cc",
622        "gc/accounting/card_table_test.cc",
623        "gc/accounting/mod_union_table_test.cc",
624        "gc/accounting/space_bitmap_test.cc",
625        "gc/collector/immune_spaces_test.cc",
626        "gc/heap_test.cc",
627        "gc/heap_verification_test.cc",
628        "gc/reference_queue_test.cc",
629        "gc/space/dlmalloc_space_static_test.cc",
630        "gc/space/dlmalloc_space_random_test.cc",
631        "gc/space/image_space_test.cc",
632        "gc/space/large_object_space_test.cc",
633        "gc/space/rosalloc_space_static_test.cc",
634        "gc/space/rosalloc_space_random_test.cc",
635        "gc/space/space_create_test.cc",
636        "gc/system_weak_test.cc",
637        "gc/task_processor_test.cc",
638        "gtest_test.cc",
639        "handle_scope_test.cc",
640        "hidden_api_test.cc",
641        "imtable_test.cc",
642        "indirect_reference_table_test.cc",
643        "instrumentation_test.cc",
644        "intern_table_test.cc",
645        "interpreter/safe_math_test.cc",
646        "interpreter/unstarted_runtime_test.cc",
647        "jit/jit_memory_region_test.cc",
648        "jit/profile_saver_test.cc",
649        "jit/profiling_info_test.cc",
650        "jni/java_vm_ext_test.cc",
651        "jni/jni_internal_test.cc",
652        "method_handles_test.cc",
653        "mirror/dex_cache_test.cc",
654        "mirror/method_type_test.cc",
655        "mirror/object_test.cc",
656        "mirror/var_handle_test.cc",
657        "monitor_pool_test.cc",
658        "monitor_test.cc",
659        "oat_file_test.cc",
660        "oat_file_assistant_test.cc",
661        "parsed_options_test.cc",
662        "prebuilt_tools_test.cc",
663        "proxy_test.cc",
664        "reference_table_test.cc",
665        "runtime_callbacks_test.cc",
666        "runtime_test.cc",
667        "subtype_check_info_test.cc",
668        "subtype_check_test.cc",
669        "thread_pool_test.cc",
670        "transaction_test.cc",
671        "two_runtimes_test.cc",
672        "vdex_file_test.cc",
673        "verifier/method_verifier_test.cc",
674        "verifier/reg_type_test.cc",
675    ],
676    shared_libs: [
677        "libbacktrace",
678    ],
679    header_libs: [
680        "art_cmdlineparser_headers", // For parsed_options_test.
681    ],
682}
683
684art_cc_test {
685    name: "art_runtime_compiler_tests",
686    defaults: [
687        "art_gtest_defaults",
688    ],
689    srcs: [
690        "reflection_test.cc",
691        "module_exclusion_test.cc",
692    ],
693    shared_libs: [
694        "libartd-compiler",
695        "libvixld",
696    ],
697}
698
699cc_library_headers {
700    name: "libart_runtime_headers_ndk",
701    host_supported: true,
702    export_include_dirs: ["."],
703    sdk_version: "current",
704
705    apex_available: [
706        "com.android.art.debug",
707        "com.android.art.release",
708    ],
709}
710
711genrule {
712    name: "libart_mterp.arm",
713    out: ["mterp_arm.S"],
714    srcs: ["interpreter/mterp/arm/*.S"],
715    tool_files: [
716        "interpreter/mterp/gen_mterp.py",
717        "interpreter/mterp/common/gen_setup.py",
718    ],
719    cmd: "$(location interpreter/mterp/gen_mterp.py) $(out) $(in)",
720}
721
722genrule {
723    name: "libart_mterp.arm64",
724    out: ["mterp_arm64.S"],
725    srcs: ["interpreter/mterp/arm64/*.S"],
726    tool_files: [
727        "interpreter/mterp/gen_mterp.py",
728        "interpreter/mterp/common/gen_setup.py",
729    ],
730    cmd: "$(location interpreter/mterp/gen_mterp.py) $(out) $(in)",
731}
732
733genrule {
734    name: "libart_mterp.x86",
735    out: ["mterp_x86.S"],
736    srcs: ["interpreter/mterp/x86/*.S"],
737    tool_files: [
738        "interpreter/mterp/gen_mterp.py",
739        "interpreter/mterp/common/gen_setup.py",
740    ],
741    cmd: "$(location interpreter/mterp/gen_mterp.py) $(out) $(in)",
742}
743
744genrule {
745    name: "libart_mterp.x86_64",
746    out: ["mterp_x86_64.S"],
747    srcs: ["interpreter/mterp/x86_64/*.S"],
748    tool_files: [
749        "interpreter/mterp/gen_mterp.py",
750        "interpreter/mterp/common/gen_setup.py",
751    ],
752    cmd: "$(location interpreter/mterp/gen_mterp.py) $(out) $(in)",
753}
754
755genrule {
756    name: "libart_mterp.x86_64ng",
757    out: ["mterp_x86_64ng.S"],
758    srcs: [
759        "interpreter/mterp/x86_64ng/*.S",
760        "interpreter/mterp/x86_64/arithmetic.S",
761        "interpreter/mterp/x86_64/floating_point.S",
762    ],
763    tool_files: [
764        "interpreter/mterp/gen_mterp.py",
765        "interpreter/mterp/common/gen_setup.py",
766    ],
767    cmd: "$(location interpreter/mterp/gen_mterp.py) $(out) $(in)",
768}
769