blob: 26dfacdc399c647171e15016e598d4b462db03b6 [file] [log] [blame]
Orion Hodson4c3ade62021-02-10 14:07:10 +00001//
2// Copyright (C) 2020 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
Bob Badour9150de62021-02-26 03:22:24 -080017package {
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
Orion Hodson4c3ade62021-02-10 14:07:10 +000026cc_defaults {
27 name: "odrefresh-defaults",
28 host_supported: true,
29 defaults: ["art_defaults"],
30 srcs: [
31 "odrefresh.cc",
32 ],
33 local_include_dirs: ["include"],
34 header_libs: ["dexoptanalyzer_headers"],
35 generated_sources: ["apex-info-list"],
36 shared_libs: [
37 "libartpalette",
38 "libbase",
39 "liblog",
40 ],
41 static_libs: ["libxml2"],
42 target: {
43 android: {
44 // Use the 32-bit version of odrefresh on devices.
45 compile_multilib: "prefer32",
46 },
47 linux: {
48 enabled: true,
49 },
50 host: {
51 shared_libs: [
52 // Both these libraries for libxml2 on host for code derived from apex-info-list.
53 "libicui18n",
54 "libicuuc",
55 ],
56 },
57 },
58 tidy: true,
59 tidy_flags: [
Chih-Hung Hsiehe4b7d432021-02-25 20:51:43 -080060 "-format-style=file",
61 "-header-filter=(art/odrefresh/|system/apex/)",
Orion Hodson4c3ade62021-02-10 14:07:10 +000062 ],
63}
64
65cc_library_headers {
66 name: "odrefresh_headers",
67 export_include_dirs: ["include"],
68 host_supported: true,
69 stl: "none",
70 system_shared_libs: [],
71 min_sdk_version: "29", // As part of mainline modules(APEX), it should support at least 29(Q).
72 sdk_version: "minimum", // The minimum sdk version required by users of this module.
73 apex_available: [
74 "//apex_available:platform", // For odsign.
75 ],
76 visibility: ["//visibility:public"],
77}
78
79art_cc_binary {
80 name: "odrefresh",
81 defaults: ["odrefresh-defaults"],
82 required: [
83 "dexoptanalyzer",
84 "dex2oat",
85 ],
86 shared_libs: [
87 "libart",
88 "libartbase",
89 ],
90 apex_available: [
91 "com.android.art",
92 "com.android.art.debug",
93 ],
94}
95
96art_cc_binary {
97 name: "odrefreshd",
98 defaults: [
99 "art_debug_defaults",
100 "odrefresh-defaults",
101 ],
102 required: [
103 "dexoptanalyzerd",
104 "dex2oatd",
105 ],
106 shared_libs: [
107 "libartd",
108 "libartbased",
109 ],
110 apex_available: [
111 "com.android.art.debug",
112 ],
113}
114
115art_cc_test {
116 name: "art_odrefresh_tests",
117 defaults: [
118 "art_gtest_defaults",
119 ],
120 header_libs: ["odrefresh_headers"],
121 srcs: [
122 "odr_artifacts_test.cc",
123 "odrefresh_test.cc",
124 ],
125 shared_libs: [
126 "libbase",
127 ],
128}