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