1// 2// Copyright (C) 2021 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 17package { 18 // See: http://go/android-license-faq 19 // A large-scale-change added 'default_applicable_licenses' to import 20 // all of the 'license_kinds' from "art_license" 21 // to get the below license kinds: 22 // SPDX-license-identifier-Apache-2.0 23 default_applicable_licenses: ["art_license"], 24} 25 26cc_defaults { 27 // This library contains low-level interfaces used to call dex2oat and related tools. This will 28 // allow other libraries or programs besides the ART Service to make use of this functionality. 29 30 name: "libarttools_defaults", 31 defaults: ["art_defaults"], 32 host_supported: true, 33 srcs: [ 34 "tools/tools.cc", 35 ], 36 export_include_dirs: ["."], 37 shared_libs: [ 38 "libbase", 39 ], 40 export_shared_lib_headers: ["libbase"], 41} 42 43cc_library { 44 name: "libarttools", 45 defaults: ["libarttools_defaults"], 46 whole_static_libs: [ 47 // TODO(b/270049598): Investigate the cost of libc++fs compared to its utility. 48 "libc++fs", 49 ], 50 apex_available: [ 51 "com.android.art", 52 "com.android.art.debug", 53 ], 54} 55 56art_cc_defaults { 57 name: "art_libarttools_tests_defaults", 58 defaults: ["libarttools_defaults"], 59 srcs: [ 60 "tools/art_exec_test.cc", 61 "tools/cmdline_builder_test.cc", 62 "tools/system_properties_test.cc", 63 "tools/tools_test.cc", 64 ], 65 shared_libs: [ 66 "libbase", 67 ], 68 static_libs: [ 69 "libgmock", 70 ], 71 target: { 72 android: { 73 static_libs: ["libmodules-utils-build"], 74 }, 75 }, 76} 77 78// Version of ART gtest `art_libarttools_tests` bundled with the ART APEX on target. 79// TODO(b/192274705): Remove this module when the migration to standalone ART gtests is complete. 80art_cc_test { 81 name: "art_libarttools_tests", 82 defaults: [ 83 "art_gtest_defaults", 84 "art_libarttools_tests_defaults", 85 ], 86} 87 88// Standalone version of ART gtest `art_libarttools_tests`, not bundled with the ART APEX on 89// target. 90art_cc_test { 91 name: "art_standalone_libarttools_tests", 92 defaults: [ 93 "art_standalone_gtest_defaults", 94 "art_libarttools_tests_defaults", 95 ], 96} 97 98cc_binary { 99 name: "art_exec", 100 defaults: [ 101 "art_defaults", 102 ], 103 srcs: [ 104 "tools/art_exec.cc", 105 ], 106 shared_libs: [ 107 "libartbase", 108 "libartpalette", 109 "libarttools", // Contains "libc++fs". 110 "libbase", 111 ], 112 static_libs: [ 113 "libcap", 114 ], 115 apex_available: [ 116 "com.android.art", 117 "com.android.art.debug", 118 ], 119} 120