David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 1 | // |
| 2 | // Copyright (C) 2018 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 | |
| 17 | cc_defaults { |
| 18 | name: "libprofile_defaults", |
| 19 | defaults: ["art_defaults"], |
| 20 | host_supported: true, |
| 21 | srcs: [ |
Nicolas Geoffray | a0fc13a | 2019-07-23 15:48:39 +0100 | [diff] [blame] | 22 | "profile/profile_boot_info.cc", |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 23 | "profile/profile_compilation_info.cc", |
| 24 | ], |
| 25 | target: { |
| 26 | android: { |
David Sehr | 9d9227a | 2018-12-19 12:32:50 -0800 | [diff] [blame] | 27 | shared_libs: [ |
Orion Hodson | 119733d | 2019-01-30 15:14:41 +0000 | [diff] [blame] | 28 | "libartpalette", |
David Sehr | 9d9227a | 2018-12-19 12:32:50 -0800 | [diff] [blame] | 29 | "libbase", |
Jiyong Park | b1c8e16 | 2020-05-18 19:04:42 +0900 | [diff] [blame] | 30 | "libz", |
David Sehr | 9d9227a | 2018-12-19 12:32:50 -0800 | [diff] [blame] | 31 | ], |
Nicolas Geoffray | 65ed42a | 2018-10-30 12:33:04 +0000 | [diff] [blame] | 32 | static_libs: [ |
| 33 | // ZipArchive support, the order matters here to get all symbols. |
| 34 | "libziparchive", |
Nicolas Geoffray | 65ed42a | 2018-10-30 12:33:04 +0000 | [diff] [blame] | 35 | ], |
Martin Stjernholm | e407d97 | 2020-09-17 01:31:10 +0100 | [diff] [blame] | 36 | export_shared_lib_headers: ["libbase"], // ART's macros.h depends on libbase's macros.h. |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 37 | }, |
David Sehr | 9d9227a | 2018-12-19 12:32:50 -0800 | [diff] [blame] | 38 | not_windows: { |
Nicolas Geoffray | 65ed42a | 2018-10-30 12:33:04 +0000 | [diff] [blame] | 39 | shared_libs: [ |
Orion Hodson | 119733d | 2019-01-30 15:14:41 +0000 | [diff] [blame] | 40 | "libartpalette", |
Nicolas Geoffray | 65ed42a | 2018-10-30 12:33:04 +0000 | [diff] [blame] | 41 | "libziparchive", |
| 42 | "libz", |
David Sehr | 9d9227a | 2018-12-19 12:32:50 -0800 | [diff] [blame] | 43 | "libbase", |
Nicolas Geoffray | 65ed42a | 2018-10-30 12:33:04 +0000 | [diff] [blame] | 44 | ], |
Martin Stjernholm | e407d97 | 2020-09-17 01:31:10 +0100 | [diff] [blame] | 45 | export_shared_lib_headers: ["libbase"], // ART's macros.h depends on libbase's macros.h. |
David Sehr | 9d9227a | 2018-12-19 12:32:50 -0800 | [diff] [blame] | 46 | }, |
| 47 | windows: { |
David Srbecky | 7711c35 | 2019-04-10 17:50:12 +0100 | [diff] [blame] | 48 | cflags: ["-Wno-thread-safety"], |
David Sehr | 9d9227a | 2018-12-19 12:32:50 -0800 | [diff] [blame] | 49 | static_libs: [ |
Orion Hodson | 119733d | 2019-01-30 15:14:41 +0000 | [diff] [blame] | 50 | "libartpalette", |
David Sehr | 9d9227a | 2018-12-19 12:32:50 -0800 | [diff] [blame] | 51 | "libziparchive", |
| 52 | "libz", |
| 53 | "libbase", |
| 54 | ], |
Martin Stjernholm | e407d97 | 2020-09-17 01:31:10 +0100 | [diff] [blame] | 55 | export_static_lib_headers: ["libbase"], // ART's macros.h depends on libbase's macros.h. |
Nicolas Geoffray | 65ed42a | 2018-10-30 12:33:04 +0000 | [diff] [blame] | 56 | }, |
David Srbecky | d53f606 | 2019-03-22 14:55:21 +0000 | [diff] [blame] | 57 | darwin: { |
| 58 | enabled: true, |
| 59 | }, |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 60 | }, |
Mathieu Chartier | 818cb80 | 2018-05-11 05:30:16 +0000 | [diff] [blame] | 61 | //generated_sources: ["art_libartbase_operator_srcs"], |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 62 | cflags: ["-DBUILDING_LIBART=1"], |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 63 | export_include_dirs: ["."], |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 64 | } |
| 65 | |
Andreas Gampe | ec5ed06 | 2018-01-26 16:20:02 -0800 | [diff] [blame] | 66 | cc_defaults { |
| 67 | name: "libprofile_static_base_defaults", |
Martin Stjernholm | 35f765b | 2020-09-23 00:38:38 +0100 | [diff] [blame] | 68 | whole_static_libs: [ |
Andreas Gampe | ec5ed06 | 2018-01-26 16:20:02 -0800 | [diff] [blame] | 69 | "libbase", |
Nicolas Geoffray | 65ed42a | 2018-10-30 12:33:04 +0000 | [diff] [blame] | 70 | "libz", |
| 71 | "libziparchive", |
Andreas Gampe | ec5ed06 | 2018-01-26 16:20:02 -0800 | [diff] [blame] | 72 | ], |
| 73 | } |
| 74 | |
| 75 | cc_defaults { |
| 76 | name: "libprofile_static_defaults", |
| 77 | defaults: [ |
| 78 | "libprofile_static_base_defaults", |
| 79 | "libartbase_static_defaults", |
| 80 | "libdexfile_static_defaults", |
| 81 | ], |
Martin Stjernholm | 35f765b | 2020-09-23 00:38:38 +0100 | [diff] [blame] | 82 | whole_static_libs: ["libprofile"], |
Andreas Gampe | ec5ed06 | 2018-01-26 16:20:02 -0800 | [diff] [blame] | 83 | } |
| 84 | |
| 85 | cc_defaults { |
| 86 | name: "libprofiled_static_defaults", |
| 87 | defaults: [ |
| 88 | "libprofile_static_base_defaults", |
| 89 | "libartbased_static_defaults", |
| 90 | "libdexfiled_static_defaults", |
| 91 | ], |
Martin Stjernholm | 35f765b | 2020-09-23 00:38:38 +0100 | [diff] [blame] | 92 | whole_static_libs: ["libprofiled"], |
Andreas Gampe | ec5ed06 | 2018-01-26 16:20:02 -0800 | [diff] [blame] | 93 | } |
| 94 | |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 95 | art_cc_library { |
| 96 | name: "libprofile", |
Christopher Ferris | 0d38e85 | 2019-12-11 09:37:19 -0800 | [diff] [blame] | 97 | defaults: [ |
| 98 | "libprofile_defaults", |
| 99 | "libart_nativeunwind_defaults", |
| 100 | ], |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 101 | shared_libs: [ |
| 102 | "libbase", |
Nicolas Geoffray | 65ed42a | 2018-10-30 12:33:04 +0000 | [diff] [blame] | 103 | "libziparchive", |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 104 | ], |
Nicolas Geoffray | 65ed42a | 2018-10-30 12:33:04 +0000 | [diff] [blame] | 105 | export_shared_lib_headers: ["libbase"], |
David Sehr | 9d9227a | 2018-12-19 12:32:50 -0800 | [diff] [blame] | 106 | target: { |
David Srbecky | 7711c35 | 2019-04-10 17:50:12 +0100 | [diff] [blame] | 107 | android: { |
| 108 | shared_libs: [ |
| 109 | "libartbase", |
| 110 | "libdexfile", |
| 111 | ], |
| 112 | }, |
| 113 | not_windows: { |
| 114 | shared_libs: [ |
| 115 | "libartbase", |
| 116 | "libdexfile", |
| 117 | ], |
| 118 | }, |
David Sehr | 9d9227a | 2018-12-19 12:32:50 -0800 | [diff] [blame] | 119 | windows: { |
David Srbecky | 7711c35 | 2019-04-10 17:50:12 +0100 | [diff] [blame] | 120 | enabled: true, |
| 121 | shared: { |
| 122 | enabled: false, |
| 123 | }, |
| 124 | static_libs: [ |
| 125 | "libartbase", |
| 126 | "libdexfile", |
| 127 | ], |
| 128 | }, |
| 129 | }, |
Jiyong Park | 066dd902 | 2019-12-19 02:11:59 +0000 | [diff] [blame] | 130 | apex_available: [ |
Martin Stjernholm | 3e9abfc | 2020-10-09 22:17:51 +0100 | [diff] [blame^] | 131 | "com.android.art", |
Jiyong Park | 066dd902 | 2019-12-19 02:11:59 +0000 | [diff] [blame] | 132 | "com.android.art.debug", |
| 133 | ], |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 134 | } |
| 135 | |
| 136 | art_cc_library { |
| 137 | name: "libprofiled", |
| 138 | defaults: [ |
| 139 | "art_debug_defaults", |
| 140 | "libprofile_defaults", |
| 141 | ], |
| 142 | shared_libs: [ |
| 143 | "libbase", |
Nicolas Geoffray | 65ed42a | 2018-10-30 12:33:04 +0000 | [diff] [blame] | 144 | "libziparchive", |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 145 | ], |
David Srbecky | 7711c35 | 2019-04-10 17:50:12 +0100 | [diff] [blame] | 146 | target: { |
| 147 | android: { |
| 148 | shared_libs: [ |
| 149 | "libartbased", |
| 150 | "libdexfiled", |
| 151 | ], |
| 152 | }, |
| 153 | not_windows: { |
| 154 | shared_libs: [ |
| 155 | "libartbased", |
| 156 | "libdexfiled", |
| 157 | ], |
| 158 | }, |
| 159 | windows: { |
| 160 | static_libs: [ |
| 161 | "libartbased", |
| 162 | "libdexfiled", |
| 163 | ], |
| 164 | }, |
| 165 | }, |
Nicolas Geoffray | 65ed42a | 2018-10-30 12:33:04 +0000 | [diff] [blame] | 166 | export_shared_lib_headers: ["libbase"], |
Jiyong Park | 066dd902 | 2019-12-19 02:11:59 +0000 | [diff] [blame] | 167 | apex_available: [ |
| 168 | "com.android.art.debug", |
| 169 | ], |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 170 | } |
| 171 | |
| 172 | // For now many of these tests still use CommonRuntimeTest, almost universally because of |
| 173 | // ScratchFile and related. |
| 174 | // TODO: Remove CommonRuntimeTest dependency from these tests. |
| 175 | art_cc_test { |
| 176 | name: "art_libprofile_tests", |
| 177 | defaults: [ |
| 178 | "art_gtest_defaults", |
| 179 | ], |
David Srbecky | 4a88a5a | 2020-05-05 16:21:57 +0100 | [diff] [blame] | 180 | data: [ |
| 181 | ":art-gtest-jars-ManyMethods", |
| 182 | ":art-gtest-jars-MultiDex", |
| 183 | ":art-gtest-jars-ProfileTestMultiDex", |
| 184 | ], |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 185 | srcs: [ |
Nicolas Geoffray | a0fc13a | 2019-07-23 15:48:39 +0100 | [diff] [blame] | 186 | "profile/profile_boot_info_test.cc", |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 187 | "profile/profile_compilation_info_test.cc", |
| 188 | ], |
| 189 | shared_libs: [ |
| 190 | "libartbased", |
| 191 | "libdexfiled", |
David Sehr | 1f01016 | 2018-05-15 08:59:32 -0700 | [diff] [blame] | 192 | "libartbased", |
Nicolas Geoffray | 65ed42a | 2018-10-30 12:33:04 +0000 | [diff] [blame] | 193 | "libziparchive", |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 194 | ], |
| 195 | } |