blob: a3fa07c7acbb6698133f53ea028452a72995fc01 [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"],
Orion Hodson947a8502021-03-08 15:40:09 +000035 generated_sources: [
36 "apex-info-list",
37 "art-apex-cache-info",
38 ],
Orion Hodson4c3ade62021-02-10 14:07:10 +000039 shared_libs: [
40 "libartpalette",
41 "libbase",
Orion Hodson947a8502021-03-08 15:40:09 +000042 "libdexfile",
Orion Hodson4c3ade62021-02-10 14:07:10 +000043 "liblog",
44 ],
45 static_libs: ["libxml2"],
46 target: {
47 android: {
48 // Use the 32-bit version of odrefresh on devices.
49 compile_multilib: "prefer32",
50 },
51 linux: {
52 enabled: true,
53 },
54 host: {
55 shared_libs: [
56 // Both these libraries for libxml2 on host for code derived from apex-info-list.
57 "libicui18n",
58 "libicuuc",
59 ],
60 },
61 },
62 tidy: true,
63 tidy_flags: [
Chih-Hung Hsiehe4b7d432021-02-25 20:51:43 -080064 "-format-style=file",
65 "-header-filter=(art/odrefresh/|system/apex/)",
Orion Hodson4c3ade62021-02-10 14:07:10 +000066 ],
67}
68
69cc_library_headers {
70 name: "odrefresh_headers",
71 export_include_dirs: ["include"],
72 host_supported: true,
73 stl: "none",
74 system_shared_libs: [],
75 min_sdk_version: "29", // As part of mainline modules(APEX), it should support at least 29(Q).
76 sdk_version: "minimum", // The minimum sdk version required by users of this module.
77 apex_available: [
78 "//apex_available:platform", // For odsign.
79 ],
80 visibility: ["//visibility:public"],
81}
82
83art_cc_binary {
84 name: "odrefresh",
85 defaults: ["odrefresh-defaults"],
86 required: [
87 "dexoptanalyzer",
88 "dex2oat",
89 ],
90 shared_libs: [
91 "libart",
92 "libartbase",
93 ],
94 apex_available: [
95 "com.android.art",
96 "com.android.art.debug",
97 ],
98}
99
100art_cc_binary {
101 name: "odrefreshd",
102 defaults: [
103 "art_debug_defaults",
104 "odrefresh-defaults",
105 ],
106 required: [
107 "dexoptanalyzerd",
108 "dex2oatd",
109 ],
110 shared_libs: [
111 "libartd",
112 "libartbased",
113 ],
114 apex_available: [
115 "com.android.art.debug",
116 ],
117}
118
119art_cc_test {
120 name: "art_odrefresh_tests",
121 defaults: [
122 "art_gtest_defaults",
123 ],
124 header_libs: ["odrefresh_headers"],
125 srcs: [
126 "odr_artifacts_test.cc",
127 "odrefresh_test.cc",
128 ],
129 shared_libs: [
130 "libbase",
131 ],
132}
Orion Hodson947a8502021-03-08 15:40:09 +0000133
134xsd_config {
135 name: "art-apex-cache-info",
136 srcs: ["CacheInfo.xsd"],
137 package_name: "com.android.art",
138 api_dir: "schema",
139 gen_writer: true,
140}