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 16package { 17 // See: http://go/android-license-faq 18 // A large-scale-change added 'default_applicable_licenses' to import 19 // all of the 'license_kinds' from "art_license" 20 // to get the below license kinds: 21 // SPDX-license-identifier-Apache-2.0 22 default_applicable_licenses: ["art_license"], 23} 24 25cc_defaults { 26 name: "artd_defaults", 27 defaults: ["art_defaults"], 28 srcs: [ 29 "artd.cc", 30 "file_utils.cc", 31 "path_utils.cc", 32 ], 33 header_libs: [ 34 "art_cmdlineparser_headers", 35 "profman_headers", 36 ], 37 shared_libs: [ 38 "libarttools", // Contains "libc++fs". 39 "libbase", 40 "libbinder_ndk", 41 "libselinux", 42 ], 43 static_libs: [ 44 "artd-aidl-ndk", 45 ], 46} 47 48art_cc_binary { 49 name: "artd", 50 defaults: ["artd_defaults"], 51 srcs: [ 52 "artd_main.cc", 53 ], 54 shared_libs: [ 55 "libart", 56 "libartbase", 57 ], 58 apex_available: [ 59 "com.android.art", 60 "com.android.art.debug", 61 ], 62} 63 64art_cc_defaults { 65 name: "art_artd_tests_defaults", 66 defaults: ["artd_defaults"], 67 static_libs: [ 68 "libgmock", 69 ], 70 srcs: [ 71 "artd_test.cc", 72 "file_utils_test.cc", 73 "path_utils_test.cc", 74 ], 75 data: [ 76 ":art-gtest-jars-Main", 77 ":art-gtest-jars-Nested", 78 ], 79} 80 81// Version of ART gtest `art_artd_tests` bundled with the ART APEX on target. 82// 83// This test requires the full libbinder_ndk implementation on host, which is 84// not available as a prebuilt on the thin master-art branch. Hence it won't 85// work there, and there's a conditional in Android.gtest.mk to exclude it from 86// test-art-host-gtest. 87art_cc_test { 88 name: "art_artd_tests", 89 defaults: [ 90 "art_gtest_defaults", 91 "art_artd_tests_defaults", 92 ], 93} 94 95// Standalone version of ART gtest `art_artd_tests`, not bundled with the ART 96// APEX on target. 97art_cc_test { 98 name: "art_standalone_artd_tests", 99 defaults: [ 100 "art_standalone_gtest_defaults", 101 "art_artd_tests_defaults", 102 ], 103 test_config_template: "art_standalone_artd_tests.xml", 104} 105