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", |
| 30 | ], |
Nicolas Geoffray | 65ed42a | 2018-10-30 12:33:04 +0000 | [diff] [blame] | 31 | static_libs: [ |
| 32 | // ZipArchive support, the order matters here to get all symbols. |
| 33 | "libziparchive", |
| 34 | "libz", |
| 35 | ], |
David Sehr | 9d9227a | 2018-12-19 12:32:50 -0800 | [diff] [blame] | 36 | export_shared_lib_headers: ["libbase"], |
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 | ], |
David Sehr | 9d9227a | 2018-12-19 12:32:50 -0800 | [diff] [blame] | 45 | export_shared_lib_headers: ["libbase"], |
| 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 | ], |
| 55 | export_static_lib_headers: ["libbase"], |
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: ["."], |
| 64 | // ART's macros.h depends on libbase's macros.h. |
| 65 | // Note: runtime_options.h depends on cmdline. But we don't really want to export this |
| 66 | // generically. dex2oat takes care of it itself. |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 67 | } |
| 68 | |
Andreas Gampe | ec5ed06 | 2018-01-26 16:20:02 -0800 | [diff] [blame] | 69 | cc_defaults { |
| 70 | name: "libprofile_static_base_defaults", |
| 71 | static_libs: [ |
| 72 | "libbase", |
Nicolas Geoffray | 65ed42a | 2018-10-30 12:33:04 +0000 | [diff] [blame] | 73 | "libz", |
| 74 | "libziparchive", |
Andreas Gampe | ec5ed06 | 2018-01-26 16:20:02 -0800 | [diff] [blame] | 75 | ], |
| 76 | } |
| 77 | |
| 78 | cc_defaults { |
| 79 | name: "libprofile_static_defaults", |
| 80 | defaults: [ |
| 81 | "libprofile_static_base_defaults", |
| 82 | "libartbase_static_defaults", |
| 83 | "libdexfile_static_defaults", |
| 84 | ], |
| 85 | static_libs: ["libprofile"], |
| 86 | } |
| 87 | |
| 88 | cc_defaults { |
| 89 | name: "libprofiled_static_defaults", |
| 90 | defaults: [ |
| 91 | "libprofile_static_base_defaults", |
| 92 | "libartbased_static_defaults", |
| 93 | "libdexfiled_static_defaults", |
| 94 | ], |
| 95 | static_libs: ["libprofiled"], |
| 96 | } |
| 97 | |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 98 | art_cc_library { |
| 99 | name: "libprofile", |
Christopher Ferris | 0d38e85 | 2019-12-11 09:37:19 -0800 | [diff] [blame] | 100 | defaults: [ |
| 101 | "libprofile_defaults", |
| 102 | "libart_nativeunwind_defaults", |
| 103 | ], |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 104 | shared_libs: [ |
| 105 | "libbase", |
Nicolas Geoffray | 65ed42a | 2018-10-30 12:33:04 +0000 | [diff] [blame] | 106 | "libziparchive", |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 107 | ], |
Nicolas Geoffray | 65ed42a | 2018-10-30 12:33:04 +0000 | [diff] [blame] | 108 | export_shared_lib_headers: ["libbase"], |
David Sehr | 9d9227a | 2018-12-19 12:32:50 -0800 | [diff] [blame] | 109 | target: { |
David Srbecky | 7711c35 | 2019-04-10 17:50:12 +0100 | [diff] [blame] | 110 | android: { |
| 111 | shared_libs: [ |
| 112 | "libartbase", |
| 113 | "libdexfile", |
| 114 | ], |
| 115 | }, |
| 116 | not_windows: { |
| 117 | shared_libs: [ |
| 118 | "libartbase", |
| 119 | "libdexfile", |
| 120 | ], |
| 121 | }, |
David Sehr | 9d9227a | 2018-12-19 12:32:50 -0800 | [diff] [blame] | 122 | windows: { |
David Srbecky | 7711c35 | 2019-04-10 17:50:12 +0100 | [diff] [blame] | 123 | enabled: true, |
| 124 | shared: { |
| 125 | enabled: false, |
| 126 | }, |
| 127 | static_libs: [ |
| 128 | "libartbase", |
| 129 | "libdexfile", |
| 130 | ], |
| 131 | }, |
| 132 | }, |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 133 | } |
| 134 | |
| 135 | art_cc_library { |
| 136 | name: "libprofiled", |
| 137 | defaults: [ |
| 138 | "art_debug_defaults", |
| 139 | "libprofile_defaults", |
| 140 | ], |
| 141 | shared_libs: [ |
| 142 | "libbase", |
Nicolas Geoffray | 65ed42a | 2018-10-30 12:33:04 +0000 | [diff] [blame] | 143 | "libziparchive", |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 144 | ], |
David Srbecky | 7711c35 | 2019-04-10 17:50:12 +0100 | [diff] [blame] | 145 | target: { |
| 146 | android: { |
| 147 | shared_libs: [ |
| 148 | "libartbased", |
| 149 | "libdexfiled", |
| 150 | ], |
| 151 | }, |
| 152 | not_windows: { |
| 153 | shared_libs: [ |
| 154 | "libartbased", |
| 155 | "libdexfiled", |
| 156 | ], |
| 157 | }, |
| 158 | windows: { |
| 159 | static_libs: [ |
| 160 | "libartbased", |
| 161 | "libdexfiled", |
| 162 | ], |
| 163 | }, |
| 164 | }, |
Nicolas Geoffray | 65ed42a | 2018-10-30 12:33:04 +0000 | [diff] [blame] | 165 | export_shared_lib_headers: ["libbase"], |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 166 | } |
| 167 | |
| 168 | // For now many of these tests still use CommonRuntimeTest, almost universally because of |
| 169 | // ScratchFile and related. |
| 170 | // TODO: Remove CommonRuntimeTest dependency from these tests. |
| 171 | art_cc_test { |
| 172 | name: "art_libprofile_tests", |
| 173 | defaults: [ |
| 174 | "art_gtest_defaults", |
| 175 | ], |
| 176 | srcs: [ |
Nicolas Geoffray | a0fc13a | 2019-07-23 15:48:39 +0100 | [diff] [blame] | 177 | "profile/profile_boot_info_test.cc", |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 178 | "profile/profile_compilation_info_test.cc", |
| 179 | ], |
| 180 | shared_libs: [ |
| 181 | "libartbased", |
| 182 | "libdexfiled", |
David Sehr | 1f01016 | 2018-05-15 08:59:32 -0700 | [diff] [blame] | 183 | "libartbased", |
Nicolas Geoffray | 65ed42a | 2018-10-30 12:33:04 +0000 | [diff] [blame] | 184 | "libziparchive", |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 185 | ], |
| 186 | } |