1*795d594fSAndroid Build Coastguard Worker// 2*795d594fSAndroid Build Coastguard Worker// Copyright (C) 2021 The Android Open Source Project 3*795d594fSAndroid Build Coastguard Worker// 4*795d594fSAndroid Build Coastguard Worker// Licensed under the Apache License, Version 2.0 (the "License"); 5*795d594fSAndroid Build Coastguard Worker// you may not use this file except in compliance with the License. 6*795d594fSAndroid Build Coastguard Worker// You may obtain a copy of the License at 7*795d594fSAndroid Build Coastguard Worker// 8*795d594fSAndroid Build Coastguard Worker// http://www.apache.org/licenses/LICENSE-2.0 9*795d594fSAndroid Build Coastguard Worker// 10*795d594fSAndroid Build Coastguard Worker// Unless required by applicable law or agreed to in writing, software 11*795d594fSAndroid Build Coastguard Worker// distributed under the License is distributed on an "AS IS" BASIS, 12*795d594fSAndroid Build Coastguard Worker// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13*795d594fSAndroid Build Coastguard Worker// See the License for the specific language governing permissions and 14*795d594fSAndroid Build Coastguard Worker// limitations under the License. 15*795d594fSAndroid Build Coastguard Worker// 16*795d594fSAndroid Build Coastguard Worker 17*795d594fSAndroid Build Coastguard Workerpackage { 18*795d594fSAndroid Build Coastguard Worker // See: http://go/android-license-faq 19*795d594fSAndroid Build Coastguard Worker // A large-scale-change added 'default_applicable_licenses' to import 20*795d594fSAndroid Build Coastguard Worker // all of the 'license_kinds' from "art_license" 21*795d594fSAndroid Build Coastguard Worker // to get the below license kinds: 22*795d594fSAndroid Build Coastguard Worker // SPDX-license-identifier-Apache-2.0 23*795d594fSAndroid Build Coastguard Worker default_applicable_licenses: ["art_license"], 24*795d594fSAndroid Build Coastguard Worker default_team: "trendy_team_art_mainline", 25*795d594fSAndroid Build Coastguard Worker} 26*795d594fSAndroid Build Coastguard Worker 27*795d594fSAndroid Build Coastguard Worker// This library contains low-level interfaces used to call dex2oat and related tools. This will 28*795d594fSAndroid Build Coastguard Worker// allow other libraries or programs besides the ART Service to make use of this functionality. 29*795d594fSAndroid Build Coastguard Workercc_library { 30*795d594fSAndroid Build Coastguard Worker name: "libarttools", 31*795d594fSAndroid Build Coastguard Worker defaults: ["art_defaults"], 32*795d594fSAndroid Build Coastguard Worker host_supported: true, 33*795d594fSAndroid Build Coastguard Worker srcs: [ 34*795d594fSAndroid Build Coastguard Worker "tools.cc", 35*795d594fSAndroid Build Coastguard Worker ], 36*795d594fSAndroid Build Coastguard Worker export_include_dirs: ["include"], 37*795d594fSAndroid Build Coastguard Worker header_libs: ["art_libartbase_headers"], 38*795d594fSAndroid Build Coastguard Worker shared_libs: [ 39*795d594fSAndroid Build Coastguard Worker "libbase", 40*795d594fSAndroid Build Coastguard Worker ], 41*795d594fSAndroid Build Coastguard Worker export_shared_lib_headers: [ 42*795d594fSAndroid Build Coastguard Worker "libbase", 43*795d594fSAndroid Build Coastguard Worker ], 44*795d594fSAndroid Build Coastguard Worker static_libs: [ 45*795d594fSAndroid Build Coastguard Worker "libfstab", 46*795d594fSAndroid Build Coastguard Worker ], 47*795d594fSAndroid Build Coastguard Worker export_static_lib_headers: [ 48*795d594fSAndroid Build Coastguard Worker "libfstab", 49*795d594fSAndroid Build Coastguard Worker ], 50*795d594fSAndroid Build Coastguard Worker apex_available: [ 51*795d594fSAndroid Build Coastguard Worker "com.android.art", 52*795d594fSAndroid Build Coastguard Worker "com.android.art.debug", 53*795d594fSAndroid Build Coastguard Worker ], 54*795d594fSAndroid Build Coastguard Worker target: { 55*795d594fSAndroid Build Coastguard Worker android: { 56*795d594fSAndroid Build Coastguard Worker compile_multilib: "first", 57*795d594fSAndroid Build Coastguard Worker }, 58*795d594fSAndroid Build Coastguard Worker }, 59*795d594fSAndroid Build Coastguard Worker} 60*795d594fSAndroid Build Coastguard Worker 61*795d594fSAndroid Build Coastguard Workercc_library_headers { 62*795d594fSAndroid Build Coastguard Worker name: "libarttools_binder_utils", 63*795d594fSAndroid Build Coastguard Worker defaults: ["art_defaults"], 64*795d594fSAndroid Build Coastguard Worker host_supported: true, 65*795d594fSAndroid Build Coastguard Worker export_include_dirs: ["include_binder_utils"], 66*795d594fSAndroid Build Coastguard Worker shared_libs: [ 67*795d594fSAndroid Build Coastguard Worker "libbinder_ndk", 68*795d594fSAndroid Build Coastguard Worker ], 69*795d594fSAndroid Build Coastguard Worker apex_available: [ 70*795d594fSAndroid Build Coastguard Worker "com.android.art", 71*795d594fSAndroid Build Coastguard Worker "com.android.art.debug", 72*795d594fSAndroid Build Coastguard Worker ], 73*795d594fSAndroid Build Coastguard Worker} 74*795d594fSAndroid Build Coastguard Worker 75*795d594fSAndroid Build Coastguard Workercc_library_headers { 76*795d594fSAndroid Build Coastguard Worker name: "libarttools_testing", 77*795d594fSAndroid Build Coastguard Worker defaults: ["art_defaults"], 78*795d594fSAndroid Build Coastguard Worker host_supported: true, 79*795d594fSAndroid Build Coastguard Worker export_include_dirs: ["include_testing"], 80*795d594fSAndroid Build Coastguard Worker apex_available: [ 81*795d594fSAndroid Build Coastguard Worker "com.android.art", 82*795d594fSAndroid Build Coastguard Worker "com.android.art.debug", 83*795d594fSAndroid Build Coastguard Worker ], 84*795d594fSAndroid Build Coastguard Worker} 85*795d594fSAndroid Build Coastguard Worker 86*795d594fSAndroid Build Coastguard Workerart_cc_defaults { 87*795d594fSAndroid Build Coastguard Worker name: "art_libarttools_tests_defaults", 88*795d594fSAndroid Build Coastguard Worker srcs: [ 89*795d594fSAndroid Build Coastguard Worker "art_exec_test.cc", 90*795d594fSAndroid Build Coastguard Worker "cmdline_builder_test.cc", 91*795d594fSAndroid Build Coastguard Worker "system_properties_test.cc", 92*795d594fSAndroid Build Coastguard Worker "tools_test.cc", 93*795d594fSAndroid Build Coastguard Worker ], 94*795d594fSAndroid Build Coastguard Worker header_libs: [ 95*795d594fSAndroid Build Coastguard Worker "libarttools_testing", 96*795d594fSAndroid Build Coastguard Worker ], 97*795d594fSAndroid Build Coastguard Worker shared_libs: [ 98*795d594fSAndroid Build Coastguard Worker "liblog", // libbase dependency 99*795d594fSAndroid Build Coastguard Worker ], 100*795d594fSAndroid Build Coastguard Worker static_libs: [ 101*795d594fSAndroid Build Coastguard Worker "libgmock", 102*795d594fSAndroid Build Coastguard Worker ], 103*795d594fSAndroid Build Coastguard Worker target: { 104*795d594fSAndroid Build Coastguard Worker android: { 105*795d594fSAndroid Build Coastguard Worker static_libs: ["libmodules-utils-build"], 106*795d594fSAndroid Build Coastguard Worker compile_multilib: "first", 107*795d594fSAndroid Build Coastguard Worker }, 108*795d594fSAndroid Build Coastguard Worker }, 109*795d594fSAndroid Build Coastguard Worker} 110*795d594fSAndroid Build Coastguard Worker 111*795d594fSAndroid Build Coastguard Worker// Version of ART gtest `art_libarttools_tests` bundled for host. 112*795d594fSAndroid Build Coastguard Worker// TODO(b/192274705): Remove this module when the migration to standalone ART gtests is complete. 113*795d594fSAndroid Build Coastguard Workerart_cc_test { 114*795d594fSAndroid Build Coastguard Worker name: "art_libarttools_tests", 115*795d594fSAndroid Build Coastguard Worker device_supported: false, 116*795d594fSAndroid Build Coastguard Worker defaults: [ 117*795d594fSAndroid Build Coastguard Worker "art_gtest_defaults", 118*795d594fSAndroid Build Coastguard Worker "art_libarttools_tests_defaults", 119*795d594fSAndroid Build Coastguard Worker ], 120*795d594fSAndroid Build Coastguard Worker shared_libs: [ 121*795d594fSAndroid Build Coastguard Worker "libarttools", 122*795d594fSAndroid Build Coastguard Worker "libbase", 123*795d594fSAndroid Build Coastguard Worker ], 124*795d594fSAndroid Build Coastguard Worker} 125*795d594fSAndroid Build Coastguard Worker 126*795d594fSAndroid Build Coastguard Worker// Standalone version of ART gtest `art_libarttools_tests`, not bundled with the ART APEX on 127*795d594fSAndroid Build Coastguard Worker// target. 128*795d594fSAndroid Build Coastguard Workerart_cc_test { 129*795d594fSAndroid Build Coastguard Worker name: "art_standalone_libarttools_tests", 130*795d594fSAndroid Build Coastguard Worker defaults: [ 131*795d594fSAndroid Build Coastguard Worker "art_standalone_gtest_defaults", 132*795d594fSAndroid Build Coastguard Worker "art_libarttools_tests_defaults", 133*795d594fSAndroid Build Coastguard Worker ], 134*795d594fSAndroid Build Coastguard Worker srcs: [ 135*795d594fSAndroid Build Coastguard Worker "binder_utils_test.cc", 136*795d594fSAndroid Build Coastguard Worker ], 137*795d594fSAndroid Build Coastguard Worker header_libs: [ 138*795d594fSAndroid Build Coastguard Worker "libarttools_binder_utils", 139*795d594fSAndroid Build Coastguard Worker ], 140*795d594fSAndroid Build Coastguard Worker shared_libs: [ 141*795d594fSAndroid Build Coastguard Worker "libbinder_ndk", 142*795d594fSAndroid Build Coastguard Worker ], 143*795d594fSAndroid Build Coastguard Worker static_libs: [ 144*795d594fSAndroid Build Coastguard Worker "libarttools", 145*795d594fSAndroid Build Coastguard Worker "libbase", 146*795d594fSAndroid Build Coastguard Worker "libfstab", 147*795d594fSAndroid Build Coastguard Worker ], 148*795d594fSAndroid Build Coastguard Worker test_config_template: ":art-gtests-target-standalone-non-multilib-template", 149*795d594fSAndroid Build Coastguard Worker} 150*795d594fSAndroid Build Coastguard Worker 151*795d594fSAndroid Build Coastguard Workercc_binary { 152*795d594fSAndroid Build Coastguard Worker name: "art_exec", 153*795d594fSAndroid Build Coastguard Worker defaults: [ 154*795d594fSAndroid Build Coastguard Worker "art_defaults", 155*795d594fSAndroid Build Coastguard Worker ], 156*795d594fSAndroid Build Coastguard Worker srcs: [ 157*795d594fSAndroid Build Coastguard Worker "art_exec.cc", 158*795d594fSAndroid Build Coastguard Worker ], 159*795d594fSAndroid Build Coastguard Worker shared_libs: [ 160*795d594fSAndroid Build Coastguard Worker "libartbase", 161*795d594fSAndroid Build Coastguard Worker "libartpalette", 162*795d594fSAndroid Build Coastguard Worker "libarttools", 163*795d594fSAndroid Build Coastguard Worker "libbase", 164*795d594fSAndroid Build Coastguard Worker ], 165*795d594fSAndroid Build Coastguard Worker static_libs: [ 166*795d594fSAndroid Build Coastguard Worker "libcap", 167*795d594fSAndroid Build Coastguard Worker ], 168*795d594fSAndroid Build Coastguard Worker apex_available: [ 169*795d594fSAndroid Build Coastguard Worker "com.android.art", 170*795d594fSAndroid Build Coastguard Worker "com.android.art.debug", 171*795d594fSAndroid Build Coastguard Worker ], 172*795d594fSAndroid Build Coastguard Worker} 173